Skip to content

deepchand11/Debug-Node-JS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

1.Debugging Node in Chrome with the inspect flag

Steps

  1. Go to devServer folder in command-line and run the below code

node --inspect server

  1. Open chrome console window and click on the top Node icon (screenshot)

alt text

  1. Opens a new chrome Node console window alt text

2.Debug in your IDE (VS Code)

Steps

  1. Go to terminal in IDE and run the below code

npm run lambda (starts node server)

  1. Click > Shift+Ctrl+p
  2. Select Attach to Node Process. alt text
  3. Select the top option to attach the debugger. alt text
  4. After attaching debugger to Node then you will see the debugger controls. alt text

And you're up and debugging! You can add breakpoints to your code right in your IDE, plus see the scoping of variables and the call stack.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published