As part of an Angular app I am trying to debug Jasmine test cases run by Karma in VSCode. I have referenced the below links and made the following changes
http://blog.mlewandowski.com/Debugging-Karma-tests-with-VSCode.html
Karma.conf.js
browsers: ['chromeDebug'],
singleRun: false,
customLaunchers: {
chromeDebug: {
base: 'Chrome',
flags: [ '--remote-debugging-port=9333' ]
}
},
Behavior
While running ng test the browser is launched but the [web-server] is not running and serving the files. Below is the comparison between the logs
Default - without using customLaunchers
[36m01 04 2018 10:08:37.837:DEBUG [web-server]: [39mInstantiating middleware
[36m01 04 2018 09:43:11.281:DEBUG [web-server]:
[39mserving: /Users/.../Documents/Workspace/xyz-web-app/node_modules/
karma/static/client.html
Debug - while using custLaunchers
[36m01 04 2018 10:08:37.578:DEBUG [plugin]: [39mLoading inlined plugin (defining launcher:chromeDebug).
[36m01 04 2018 10:08:37.837:DEBUG [web-server]: [39mInstantiating middleware
[33m01 04 2018 10:09:07.786:WARN [karma]: [39mNo captured browser, open http://localhost:9333/
[33m01 04 2018 10:10:48.118:WARN [launcher]: [39mChrome have not captured in 120000 ms, killing.
During the Debug more since the [web-server] is not able to server the files [web-server]: [39mserving: /Users/.../Documents/Workspace/xyz-web-app/node_modules/ karma/static/client.html
I have tried to increase captureTimeout with little success. I believe if the issue might be with additional configuration required for customLunchers. Any suggestions or direction on the fixing this will be much appreciated. Thanks