...
Section | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
2. Navigate to the ‘Run and Debug’ tab.
3. Click on the ‘create a launch.json file’. This will open a new launch.json file with no configurations just yet on your directory.
...
6. When your debugger starts running, you should see the following in your ‘DEBUG CONSOLE’:
7. Once you have your Profound.js server running from VS Code, that means you are now able to debug.
...
- In the VS Code explorer, open 'modules/pjssamples/connect4.js'
*Note: make sure your Profound.js Module has been set correctly in the config.js file of Profound.js. Here is an example:
2. Once the file is open, place a breakpoint at the desired location where you want the program to pause.
You can place a breakpoint by clicking just to the left of the line number where you intend to pause the program.
3. After this, start debugging within VS Code and launch the application in your browser using the URL displayed in the debug console.
...
You can also add the -brk and --no-worker flag for this command. -brk adds a breakpoint at the beginning of your script to wait for the debugger to attach before proceeding.
2. Then create a launch.json file, refer to the Launch config method for steps on how to do this.
Code Block | ||
---|---|---|
| ||
{ "version": "0.2.0", "configurations": [ { "request": "attach", "name": "Debug PJS", "address": "21.1.88.92", "port": 40399, "remoteRoot": "/nmas_pjs", "localRoot": "C:\\Documents\\nmas_pjs", "type": "node", "skipFiles": [ "<node_internals>/**" ] } ] } |
...