| id | title |
|---|---|
14-debug |
Debugging & Troubleshooting |
- Copy and paste the error into Google.
- Ensure that you have the correct dependencies in your
package.jsonand run anpm install
- Use VS Code's Debug tools
- Select the node file you want to run. ie.
index.js - Add a configuration for the application, by clicking the dropdown next to the play Debug and select Add Configuration and select Node
- It should autofill with the details of the project and look like the following:
{ // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "type": "node", "request": "launch", "name": "Express App", "skipFiles": ["<node_internals>/**"], "program": "${workspaceFolder}/index.js" } ] } - Hit the play debug button to run the application
- Place breakpoint in the application to stop the application to view the line.

