laike9m
laike9m

Reputation: 19308

Can't debug in VS Code

I'm new to VS Code, and is following the official tutorial to learn how to debug. However, it just won't work. First, the UI looks different. It shows "RUN".

enter image description here

Compared to what the UI looks like in the video, which shows "DEBUG".

enter image description here

Also, I added a breakpoint and hit the green start button, it just never stops.

Here's the launch.json file: enter image description here

What should I do to make the debugger work?

Upvotes: 1

Views: 5916

Answers (1)

chiragrtr
chiragrtr

Reputation: 932

You need to run node in inspect mode.

In terminal / console, do:

node --inspect app.js

Upvotes: 1

Related Questions