7

I need to launch a particular .js file for execution, in this way:

  1. npx app.js launch.conf.js //for execution of scripts

  2. npx app.js debug.conf.js //for debugging the scripts

In my debug.conf.js contains

const config = {
  debug: true,
  execArgv: ['--inspect-brk'],
  maxInstances: 1,
  cucumberOpts: {
    timeout: 30 * 1000 * 4,
  },
};
exports.config =config

, When I Execute the 2nd command via CMD I'm able to debug using chromedev Tools debugger. but when I need to debug using the VS code Editor:this is present in my launch.json file:

"type": "node",
"name": "manager",
"request": "launch",
"protocol": "auto",
//  "port": 5859,
"program": "${workspaceRoot}\\node_modules\\cdem\\bin\\app",
"execArgv": ["--inspect-brk"],
"args": [
    "run wdio.debug.conf.js"
]

I keep getting the console op as: debugger attached, waiting for debugger to disconnect and the execution is not launched.

Can someone let me how to debug this app using VS Code?

Yuki Inoue
  • 2,652
  • 4
  • 27
  • 40
Tony Frost
  • 71
  • 2
  • npx expects a module/bin as it's first argument. So, if you have jest installed as a module you can run `npx jest ...`. I don't think `npx app.js` makes sense. – Marc Sep 26 '19 at 14:50
  • Not sure if this one is still actual, WebdriverIO debugging docs were updated and there is an example VSCode config https://webdriver.io/docs/debugging.html#debugging-with-visual-studio-code-vscode Does it resolve your issue? – Mike G. Sep 21 '20 at 14:34

0 Answers0