...
- Open terminal and run the following command: node --debug=5858 /path/example.js
- NOTE: Be sure to change the path to where the javascript file is located
...
Running Node.js V8 Debugger in Eclipse:
- Let's configure Run the debugger in eclipse Eclipse by right-clicking on the file we have created earlier.
- Select 'Debug As' followed by
- Select 'Debug Configurations'.
- Click 'Debug' once you have entered all the information shown on the screen shotsshot below:
- Now changed to debug perspective by clicking Window then Open Perspective followed by Change to 'Debug' perspective e.g. Window -> Open Perspective -> Debug
- Note: Do not place the break points in the original file
- To place break points, go to the 'Project Explorer' tab then and select the folder which has the same name as created from the debug configuration then select . Select the javascript file you would want like to add break points.
- Open a browser then and add go to the following link URL: http://127.0.0.1:8124
- You should see the highlighted line of the code