-
Notifications
You must be signed in to change notification settings - Fork 127
Importing into Visual Studio Code
Ayk Borstelmann edited this page Oct 28, 2021
·
3 revisions
Visual Studio Code can be downloaded for free from here.
- Go to the Extension tab
- Install
Java Extension Packfrom Microsoft - Install
Prettier - Code formatterfrom Prettier - For Chrome Debugging, Install
Debugger for Chromefrom Microsoft - For Firefox Debugging, Install
Debugger for Firefoxfrom Firefox DevTools
We have designed our code style formatter for Java for other code we use the prettier formatter
- Go to File | Preferences | Settings search
formatter - You should find Java > Format > Settings: Url
- Paste
Resources/formatter/openRobertaJava.xmlto use our eclipse code formatter.
- Open you settings.xml file (if you don't have one create one in
.vscode/settings.json - Paste the following snippet into the settings.xml file to select prettier as you default formatter for ts, js and html (leave the first and last curly braces if your file is not empty)
{
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
}- Navigate to File | Open Folder and select the openroberta-lab repository you previosly cloned.
- Click on Run and Debug and click on create a launch.json file
- Paste the following
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Launch ServerStarter",
"request": "launch",
"mainClass": "de.fhg.iais.roberta.main.ServerStarter",
"args": "-d server.admin.dir=./Resources -d server.staticresources.dir=./OpenRobertaServer/staticResources -d robot.crosscompiler.resourcebase=../ora-cc-rsc"
},
{
"name": "Launch Chrome Debugger",
"type": "chrome",
"request": "launch",
"url": "http://localhost:1999/index.html",
"webRoot": "${workspaceFolder}/OpenRobertaServer/staticResources",
}
]
}- Start the compiler in watch mode with source maps
npm run build:sourceMapornpm run watch:sourceMap - Click on the Run and Debug tab and select in the dropdown Debug Chrome
- Navigate to
OpenRobertaWeb/srcand set breakpoints in your desired files. - Chrome will stop at the the breakpoints whenever they are reached and you can use vs-code to continue, step into, ...
Home | Community | Installation | Team 
Installation Tutorials
- Instructions to run a openroberta lab server using DOCKER
- Instructions to run the Open Roberta Lab Server natively on ubuntu ‐ not recommended
- Raspberry Pi 2/3/4 and the Open Roberta Lab
- EV3 and leJOS
- EV3 and ev3dev
- Creating the OR leJOS image
- Arduino Create Agent
- Mbed DAL: Generation and automation
Development
-
Workflows
-
Architecture
-
Blockly
-
Software engineering issues
-
Misc
-
Notes on robots
Textual Representation
Contribution
Discussions on future development