I'm trying to use JsUnit for testing. One of my tests failed, and now I want to debug the function I tested (while it's running on the test). What's the easy way to do it? Usually I just use Chrome's debugger/Firefox's Firebug, but I do this on a html where the function is used, and here I need somehow to do it from JsUnit's TestRunner.
Asked
Active
Viewed 278 times
0
-
Why not to take the function and put it on a web page so you could use Chrome DevTools (or firebug) to debug it? – Ido Green Mar 31 '12 at 17:59
-
It's possible, of course, but it's double work (for every function I'd want to check). – Gadi A Mar 31 '12 at 18:49
1 Answers
0
As of today, I am able to debug JsUnit tests by placing a breakpoint in the method under test using the Chrome Debugger. If for some reason the script file with the method under test does not appear in the debugger's list of available scripts, you can write a "debugger;" statement within your method and run the test with the Chrome Debugger open.

Jpnh
- 806
- 1
- 11
- 22