Skip to content

Commit 7fabb1a

Browse files
knightburtonyichoi
authored andcommitted
Update README.md
IoT.js-VSCode-DCO-1.0-Signed-off-by: Imre Kiss [email protected]
1 parent 6454e63 commit 7fabb1a

File tree

1 file changed

+33
-2
lines changed

1 file changed

+33
-2
lines changed

README.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
- Disconnect command
2323

2424
- Available features:
25-
- Set/Remove breakpoint
25+
- Set/Remove breakpoints
26+
- Set/Remove function breakpoints
2627
- Call stack display
2728
- Watch (evaluate expression)
2829
- 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
5556
}
5657
```
5758

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+
5874
Now you can connect to a running engine.
5975
If you are using IoT.js you have to do the following:
6076

@@ -108,7 +124,22 @@ $ ./build/bin/jerry --start-debug-server --debugger-wait-source
108124
```
109125

110126
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+
```
112143

113144
# License
114145
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

Comments
 (0)