I'm trying to debug a Protractor e2e test of an Angular application. I want to start from the e2e test and stop in the application. I set a breakpoint in the e2e test and one in an Angular component (which should be hit when running the test).
Before launching debug, both breakpoints are bound, but on debug launch the application breakpoint becomes unbound. The e2e breakpoint is hit but not the one in the Angular component.
I've tried to add sourceMap:true
in my various tsconfig.json files and in launch configuration, no luck.
I compile from command line (npm run ng serve
) which works when I debug e2e tests only or my application only. No .map
files are generated.
I want to debug in VSCode, not in Chrome.
Launch configuration:
{
"name": "Launch e2e current file",
"type": "node",
"request": "launch",
"stopOnEntry": false,
"program": "${workspaceRoot}/node_modules/protractor/bin/protractor",
"args": [
"${workspaceRoot}/protractor.conf.js",
"--specs=${file}"
],
"cwd": "${workspaceRoot}",
"sourceMaps": true,
"outFiles": [
"${workspaceRoot}/dist/out-tsc-e2e/*.js"
],
"skipSourceMapSupport": true
}
Thank you.
Edit:
Here is a sample project: https://gitlab.com/group11804/project1.git
Run npm ci
, npm run start-dev
, in VSCode add breakpoints in app.e2e-spec.ts
(test1
it()) and AppComponent.onClick()
(app.component.ts
), select Launch e2e current file
launch configuration and hit F5.
Breakpoint in AppComponent.onClick()
is not honored, debugger does not stop on it.