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

Running node js via backpack in debug mode inside visual studio code

$
0
0

I have a node API project build and run using backpack library I have created a launch.json file as following:

{
  "version": "0.0.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "Launch api project backpack",
      "program": "${workspaceFolder}/node_modules/backpack-core/bin/dev",
      "args": ["--require", "dotenv/config"],
      "cwd": "${workspaceFolder}/packages/api",
      "trace": true,
      "sourceMaps": true
    }
  ]
}

But when I am running my express project via debug the execution enters into my backpack.config.js and hit the breakpoints there and doesn't step into my /packages/api/index.js where my server starts working, however, if I change the program attribute inside my launch.json into the following:

"program": "${workspaceFolder}/node_modules/backpack-core/bin/backpack"

The server starts but doesn't hit any breakpoint inside any js file even the config file of the backpack, so can anyone help me to configure backpack to run in debug mode correctly inside vs code and hit my breakpoints


Viewing all articles
Browse latest Browse all 97371

Trending Articles



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