|
22 | 22 | - Disconnect command
|
23 | 23 |
|
24 | 24 | - Available features:
|
25 |
| - - Set/Remove breakpoint |
| 25 | + - Set/Remove breakpoints |
| 26 | + - Set/Remove function breakpoints |
26 | 27 | - Call stack display
|
27 | 28 | - Watch (evaluate expression)
|
28 | 29 | - Handle source receive from the engine
|
@@ -55,6 +56,21 @@ You have to open (or create a new) project folder where you have to define a `la
|
55 | 56 | }
|
56 | 57 | ```
|
57 | 58 |
|
| 59 | +These configuration options are required. Manifest: |
| 60 | +- `name`: The name which will be visible in the debug view |
| 61 | +- `type`: This must be `iotjs` otherwise the debug session wont start |
| 62 | +- `request`: Type of the session start, only the `attach` available for now |
| 63 | +- `address`: IP address on which the server listening. Default is `localhost` |
| 64 | +- `port`: Debug port to attach to. Default is `5001` |
| 65 | +- `localRoot`: The local source root directoy, most cases this is the `${workspaceRoot}` |
| 66 | +- `stopOnEntry`: Autmoatically stop the program after launch, the IoT.js will stop on the first breakpoint for now, no matter that is enabled or not. |
| 67 | +- `debugLog`: The type of the debug log, you can choose from 0 to 5: |
| 68 | + - 0: none |
| 69 | + - 1: Error (show errors only) |
| 70 | + - 2: Debug Session related (requests and their responses) |
| 71 | + - 3: Debug Protocol related (communication between the engine and the client) |
| 72 | + - 4: Verbose (each log type included) |
| 73 | + |
58 | 74 | Now you can connect to a running engine.
|
59 | 75 | If you are using IoT.js you have to do the following:
|
60 | 76 |
|
@@ -108,7 +124,22 @@ $ ./build/bin/jerry --start-debug-server --debugger-wait-source
|
108 | 124 | ```
|
109 | 125 |
|
110 | 126 | After the engine is running you can start the debug session inside the extension host by pressing the `F5` key or click on the green triangle in the debug panel.
|
111 |
| -If the client (VSCode extension) is connected then you have to see that file which is running inside the engine in the vscode editor and you have to see where the execution is stopped. Now you can use the VSCode debug action bar to control the debug session. |
| 127 | +If the client (VSCode extension) is connected then you have to see that file which is running inside the engine or if you started the engine in waiting mode you will get a prompt window where you can select that file what you want to running and then you can see where the execution is stopped. Now you can use the VSCode debug action bar to control the debug session. |
| 128 | + |
| 129 | +***Note:*** If you using the development version of this extension, you have to run the following commands for the first time in the extension directory: |
| 130 | +```bash |
| 131 | +# Install the node modules |
| 132 | +$ npm install |
| 133 | + |
| 134 | +# Compile the extension into the out folder |
| 135 | +$ npm run compile |
| 136 | +``` |
| 137 | +If you want to use the development extension just like any other extension in your VSCode then copy the project folder into the VSCode extensions folder: |
| 138 | +```bash |
| 139 | +# Assume that you are in the extension root folder |
| 140 | +# After this just reload the VSCode and the extension will be "installed" |
| 141 | +$ cp . ~/.vscode/extensions/ -r |
| 142 | +``` |
112 | 143 |
|
113 | 144 | # License
|
114 | 145 | IoT.js VSCode extension is Open Source software under the [Apache 2.0 license](LICENSE). Complete license and copyright information can be found within the code.
|
0 commit comments