Debugging with JSTestDriver

If im not mistakedn Debugging is possibel with JSTestDriver.
I mean its possible to set break points in the IDE and then run JSTestDriver and have it stop at the break points correct?
Can someone post how to set this up. It would be kindly appreciated. It took me forever to debug something when I moved away from harness files and started useing JSTEstDriver.

Other than this I think the test runner pluggin is aweomse just its really impossible to debug at the moment .


Anyone have any thoughts on this?



You need to use the latest WebStorm or PhpStorm (version 5).

It should not be different than debugging an app/web page - just set your breakpoints and click debug.



Hi thanks for the response. I posted a video with the issue I am having. I make a mistake the first time I  run the video but I correct it but the debugger still does not want to work on my machine.
Can you tell me what I am doing wrong?
Do I need to configure a a differen run option like JavaScript debug local?
Sorry I am just not understanding this. It appears to me that you are supposed to just click debug and it should work without an HTML harness.
Thank you for your help.


Hi Edgar,
Would you please attach here an archive of files that are needed to reproduce the bug.


the files are attached.
For the record the folder structure and naming conventions arent mine, it was not by my own design.
don't laugh.
thanks for helping.


The bug was found and will be fixed in PhpStorm/WebStorm 5.0.3.
The problem is that files listed in 'test:' section of config.jstd have '../../' prefixes.
As a workaround place config.jstd file two levels higher in a file system and remove '../../' prefixes for all referenced files. After that close captured page in a browser, restart JsTestDriver local server, capture browser again and it should debug.


FYI: I noticed that there is _project/lib/js/qunit.js file referenced in 'load:' section of config.jstd.
Actually it isn't necessary, because JsTestDriver runs QUnit tests via QUnit JsTestDriver Adapter (_project/lib/js/equiv.js and _project/lib/js/QUnitAdapter.js files).
Just remove this line and it will work.


Thanks for the help Sergey
I'm glad to have this working now.
I remember this worked before.
I'll keep my eyes open for the 5.3 release
thanks again


IN PHPStorm 5.2 which is the newer update the fix you suggested doesnt work anymore :(  big time bummer since it was working in 5.1


Coming from the future? So far the latest version publically available is only 5.0.2...


Fix version will be 5.0.3. Current is 5.0.2.


I will ask my question in this thread

Is there a way to make possible to debug all JS files in WebStorm/PHPStorm with jsTestDriver?
Beelow you can see our directory structure

May be we need to changes something in this structure to make  possible to debug all www/js/desktop/*.js files directly in PHPStorm
Files from www/js/desktop/ loaded via proxy.

and our JSTD file


- fixtures/*
- ../www/js/lib/ext-all-debug-w-comments.js
- Loader.js
- desktop/lib/CryptTest.js
- desktop/lib/TranslationsTest.js
- desktop/app/stores/OptionTest.js
  - {matcher: "*", server: "http://project.test/"}

Hello Alexandr,

Yes, sure. It's okey to ask in this thread.
At first glance, your project structure is fine for tests debugging.
Why are you loading files from www/js/desktop/ via proxy?
It's possible to list them in "load:" section (and they all will be loaded on every test run) or in "serve:" section (in this case they will be loaded by demand).


Please sign in to leave a comment.