I'm using the protractor-cucumber-framework to create a testbed environment for our QA team. I've searched around and been able to find zero help in implementing VS Code's debugging capability for use in this code. Has anyone does this? I'd really like to step away from console.log()
statements.
Asked
Active
Viewed 2,343 times
4
-
for playwright with cucumber with typescript steps - see https://stackoverflow.com/questions/46834293/how-to-debug-cucumber-in-visual-studio-code-vscode/75214824#75214824 – Sasha Bond Jan 23 '23 at 20:45
1 Answers
2
1) Upgrade your Nodejs to 8 and later
2) Create a folder .vscode
under your project base directory
3) Create a file launch.json
under .vscode
4) Copy below content into launch.json
{
// Use IntelliSense to learn about possible Node.js debug attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [{
"type": "node",
"request": "launch",
"name": "gie",
"program": "${workspaceFolder}/node_modules/protractor/built/cli.js",
"cwd": "${workspaceFolder}",
"args": [
"config/gie.config.js",
"--browser=chrome"
]
}]
}
The ${workspaceFolder}
represent your project base directory
The first value in args
is your protractor config file, you can use relative path to ${workspaceFolder}
The second and next value in args
is command options as you type in command line to run test.
My Environment: VSCode 1.8.1, Nodejs v8.9.0, Protractor 5.2.0,

yong
- 13,357
- 1
- 16
- 27
-
it works for me when I have put the file name directly in args file config,js instead of command file "protractor conf.js" – Shubham Jain May 05 '19 at 21:42