How do I run PhantomJS in Webstorm WITH ability to debug?

I can debug my Angular (typescript) project with no problems in WebStorm.

But we need to be able to run (and debug) the test scripts running under PhantomJS.

I'm not even sure how to run PhantomJS from Webstorm, much less debug it.

0
1 comment

Debugging in PhantomJS is not supported, please vote for https://youtrack.jetbrains.com/issue/WEB-6072to be notified on any progress with this feature.

>But we need to be able to run (and debug) the test scripts running under PhantomJS

is it about karma tests? You can set up your karma.config.js to use PhantomJS, and it will be used for tests running. But debugging requires Chrome...

When you debug karma tests in WebStorm, 2 browser instances are actually launched: karma launches a fresh profile of the browser specified in your configuration file, plus WebStorm runs Chrome browser with debug extension that is used for debugging. If your intent is to debug errors specific to PhantomJS, the only solution is using custom launcher with debugging enabled (github.com/karma-runner/karma-phantomjs-launcher) and debugging it remotely using another browser... doesn't work for me though - even with 'debug:true' debug switches are not passed to phantomjs

0

Please sign in to leave a comment.