Cannot debug Karma after WebStorm 8 upgrade

I can run the tests fine, but debug does not seem to do anything. I tried uninstalling 7 and 8, clearing settings, and reinstalling 8, but it still does not work.

In the console I see:

D:\development\tools\nodejs\node.exe "C:\Program Files (x86)\JetBrains\WebStorm 8.0\plugins\js-karma\js_reporter\karma-intellij\lib\intellijServer.js" --karmaPackageDir=C:\development\trunk\dev\graph\webui\browser\node_modules\karma --configFile=C:\development\trunk\dev\graph\webui\browser\karma.conf.js
INFO [karma]: Karma v0.10.10 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 33.0.1750 (Windows 7)]: Connected on socket EO36JoLeUeWEFj49kmKQ
INFO [Chrome 33.0.1750 (Windows 7)]: Connected on socket hxtcVmILmTI6dS-UkmKR
WARN [Chrome 33.0.1750 (Windows 7)]: Disconnected
ERROR [launcher]: Chrome crashed.
 
WARN [Chrome 33.0.1750 (Windows 7)]: Disconnected
INFO [Chrome 33.0.1750 (Windows 7)]: Connected on socket WsgCgWHKN2w9x2XLkmKS

But Run gives the same, but works. Sometimes it pops up and ask whether to debug in Chrome or Friefox. If I select Chrome it opens http://localhost:9876/ and does nothing. In 7 I believe this opened to http://localhost:9876/debug.html, but manually changing to that, or clicking Debug button, does not fix the issue. Is this just an issue with the Karma Plugin not being updated for 8?

10 comments
Comment actions Permalink

Please can you check if debugging works for attached project (just to see if it's project-specific)? if it doesn't, can you record a screencast that shows up the issue?



Attachment(s):
karma_jasmine.zip
0
Comment actions Permalink

Thanks for the response. This did not work for me either. Attached video.



Attachment(s):
webstorm-karma.mp4
0
Comment actions Permalink

Thanks. I see those errors in my log. The workaround does not work for me. Is there any estimate for when a fix would be available? I see it's listed for 8.0.1. Until it's fixed I will be using 7.0.3.

0
Comment actions Permalink

It's happening to me as well. Has anyone found a fix?

0
Comment actions Permalink

Restarting the IDE usually helps me.

0
Comment actions Permalink

I tried that multiple times but with no luck.

0
Comment actions Permalink

The issue is Windows-specific. Fix will be available in WebStorm 8.0.1.
Unfortunately, the only workaround is to have one local drive only. :)
Alternatively, "JavaScript Debug" run configuration can be used for Karma tests debugging. Just specify "http://localhost:9876/debug.html" URL there.
Sorry for the inconvenience.

0
Comment actions Permalink

It's possible I am missing something, but I do not see how that is valid workaround as the Karma.conf.js file is not being used to setup karma. Yes, I can debug. But the tests are not being setup correctly so they fail right off the bat.

0
Comment actions Permalink

Yes, you're right. It was just a part of the workaround.
The full workaround:
1. Start Karma run configuration in a run mode. (Or start karma server in console manually).
2. Create "JavaScript Debug" run configuration with "http://localhost:9876/debug.html" URL (or maybe another URL depending on your karma configuration).
3. Debug the created "JavaScript Debug" run configuration and breakpoints in your Karma tests should be hit.
Hope that will help.

0

Please sign in to leave a comment.