How to debug nodejs express vscode framework of the project?

Click Add Configuration, add nodeJs the launch.json
Here Insert Picture Description
editor launch.json, it can set launch.json as follows:

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Launch Program",
            "program": "${workspaceFolder}/bin/www",
            "skipFiles": [
                "<node_internals>/**"
            ]
        },
        {
            "type": "node",
            "request": "attach",
            "name": "Attach",
            "port": 5858
        }
    ]
}

run:
Here Insert Picture Description

Published 125 original articles · won praise 8 · views 20000 +

Guess you like

Origin blog.csdn.net/ll837448792/article/details/103330363