O
O
OlegBas2022-02-04 12:20:49
JavaScript
OlegBas, 2022-02-04 12:20:49

Debugging Node JS code in VS Code?

Hello! Unable to set up NodeJS debugger to work in VSCode.
I need to debug file D:\Works\online-store\server\controllers\appsController.js
I use the following configuration

{
            "type": "pwa-node",
            "request": "launch",
            "name": "Launch Program",
            "skipFiles": [
                "<node_internals>/**"
            ],
            "program": "${workspaceFolder}\\server\\controllers\\appsController.js"
        }

Next, I start the server, set a breakpoint in the class method, then use PostMan to call the method in which the breakpoint was set and there is no break.
If you put a breakpoint in the input file D:\Works\online-store\server\index.js
then the above configuration will work fine
How do I make the debugger stop in the appsController.js class method?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question