Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Orion/Documentation/Developer Guide/Debugger"
< Orion | Documentation | Developer Guide
(Add extra step for config file) |
(→Development Setup) |
||
Line 8: | Line 8: | ||
# You need Node.js v4.4.6+ to run Orion node server | # You need Node.js v4.4.6+ to run Orion node server | ||
# Checkout Orion client code (See https://wiki.eclipse.org/Orion/Getting_the_source) | # Checkout Orion client code (See https://wiki.eclipse.org/Orion/Getting_the_source) | ||
− | # Go to https:// | + | # Go to https://github.com/eclipse/orion.client/pull/4 |
# Find "Download" at the top right corner and apply this patch to your Orion code | # Find "Download" at the top right corner and apply this patch to your Orion code | ||
* Go to '''ORION_PATH/modules/orionode''' and run '''npm install''' | * Go to '''ORION_PATH/modules/orionode''' and run '''npm install''' | ||
Line 44: | Line 44: | ||
# Hold alt and double click a line number to add or remove a conditional breakpoint, although some debug adapters don't support conditional breakpoints | # Hold alt and double click a line number to add or remove a conditional breakpoint, although some debug adapters don't support conditional breakpoints | ||
# Third-party adapters might not work as good as adapters like node | # Third-party adapters might not work as good as adapters like node | ||
+ | |||
+ | [[Category:Orion]] |
Revision as of 12:43, 5 July 2017
Development Setup
Since this code is so new at the moment, you need to do a cherry pick from the gerrit patch on top of the existing Orion node server code.
Instructions to follow!
- Get code
- You need Node.js v4.4.6+ to run Orion node server
- Checkout Orion client code (See https://wiki.eclipse.org/Orion/Getting_the_source)
- Go to https://github.com/eclipse/orion.client/pull/4
- Find "Download" at the top right corner and apply this patch to your Orion code
- Go to ORION_PATH/modules/orionode and run npm install
- (optional) Configure debug adapters
- By default, node, python, java and lldb adapters are configured
- If you don't need more or less adapters, you can skip this part
- Open ORION_PATH/modules/orionode.debug.server/adapters.json
- Add new adapters in this json file. You can find available adapters and their git repositories in VSCode marketplace by searching "debugger"
- Enable debug server
- Go to ORION_PATH/modules/orionode.debug.server
- Run npm install
- Edit ORION_PATH/modules/orionode/orion.conf
- Enable debug.server.module
- Run Orion node server
- Go to ORION_PATH/modules/orionode
- Run node server.js
- Enable debug frontend
- Open http://localhost:8081 (or other port you are listening to)
- Go to settings page by clicking the gear button on the left
- Go to general settings
- Enable debugger
- Create a sample program
- Open http://localhost:8081 (or other port you are listening to)
- Create a new folder at the root of your workspace
- Create a new file called server.js in this new folder
- Type in console.log('Hello World!');
- Click the run bar at the top, and click "+Native"
- Change "Debug Adapter Type" to "node"
- Click "Select a Template" and select "Default"
- Press "Save"
- Click the play button in the run bar
- Now you can see the debug UI and the output from the hello world program
- More tips
- Double click a line number to add or remove a breakpoint
- Hold alt and double click a line number to add or remove a conditional breakpoint, although some debug adapters don't support conditional breakpoints
- Third-party adapters might not work as good as adapters like node