WDIO freezes VS Code debugger upon use of WDIO commands
See original GitHub issueI’m able to use VS Code debugger but with no ability to use WDIO commands. Any use of WDIO apis such as browser.$()… freezes VS Code debugger.
Here is my launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "WDIO",
"program": "${workspaceFolder}/node_modules/.bin/wdio",
"port": 5859,
"autoAttachChildProcesses": true,
"protocol": "inspector",
"args": [
"wdio.conf.js",
"--spec",
"spec/login/login-spec.js" // File which you would like to debug
],
"internalConsoleOptions": "openOnSessionStart",
"cwd": "${workspaceRoot}",
"env": {
"DEBUG": "1"
// use an environment variable to be able
// to toggle debug mode on and off
}
}
]
}
wdio.conf.js inludes following:
debug: true,
execArgv: ['--inspect-brk=127.0.0.1:5859'],
Is there a way to set up VS Code to be able to use all WDIO apis? Just like we would use browser.debug()
Environment:
- WebdriverIO version: 5.16.6
- Node.js version: v12.12.0
- NPM version: 6.13.0
- Browser name and version: Chrome
- Platform name and version: UNIX
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
Debugging WebdriverIO tests in VSCode - YouTube
Setting breakpoints, stepping through commands and reading variables are simple when debugging WebdriverIO tests in VSCode using node's ...
Read more >Debugging | WebdriverIO
In many cases, you can use browser.debug() to pause your test and inspect the browser. Your command line interface will also switch into...
Read more >webdriverio/webdriverio - Gitter
Anyone using vscode debugger to step through your own test code. When code is inside a 'it', it will stop at the breakpoints...
Read more >webstorm doesn't pause on debug breakpoints webdriverIO
IMPORTANT DETAIL. VSCode is able to stop at specified line using the same node, project, wdio version, js file, and the spec. command...
Read more >How to debug webdriverio in standalone mode?
I'm going absolutely nuts trying to debug a webdriverio test using Chromedriver. You simply cannot step through the code because webdriverio ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Since @christian-bromann closed that PR without merging it, should we open this issue back up @mgrybyk ?
Any help on this would be highly appreciated!