Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 97371

How to debug source code in Visual Studio Code?

$
0
0

My nodejs project uses mocha/pact.js as the test framework. I want to debug the source and not just the mocha tests. With my current launch configuration, only the breakpoints in the mocha test are reachable, they never hit the source code.

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "Mocha Tests",
      "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
      "args": [
        "-u",
        "tdd",
        "--timeout",
        "999999",
        "--colors",
        "${workspaceFolder}/tests/component/my-test.js"
      ]
    },
    {
      "type": "node",
      "request": "launch",
      "name": "Launch Program",
      "program": "${workspaceFolder}/src/server/app.js",
      "args": [
        "--inspect-brk"
      ],
      "port": 9229,
      "runtimeExecutable": "npm",
    }
]
}

Viewing all articles
Browse latest Browse all 97371

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>