Skip to content
cbaxter edited this page Dec 29, 2011 · 5 revisions

Debugging

Debugging with JSTest.NET couldn't be easier. Simply launch the unit test in question with the Visual Studio debugger and you will be prompted to launch the Visual studio Just-In-Time Debugger to debug and step through your JavaScript unit test.

See below for more detail.

Important Notes

By default the test script timeout is 10 seconds; however when running inside the debugger, this timeout is disabled. As such, it is not recommended to simply ignore the request to lauch the "Visual studio Just-In-Time Debugger" as any infinite loops (which of course your code will never have) will leave a CScript process running in the background that must be manually killed.

When choosing to run a unit test script block, JSTest will automatically add in a debugger; statement unless you explicitly choose to suppress the force debugger option. This debugger; statement will ensure you receive a prompt to attach a debugger to your unit test.

Preferred Call

  public String RunTest(String scriptBlock)

Explicit Override

  public String RunTest(String scriptBlock, Boolean forceDebuggerPromptIfAttached)

Launching The Debugger

1. Run Unit Test with Debugger

(Image Pending)

2. Select Desired Debugger

(Image Pending)

3. Step Through and Debug Code

(Image Pending)

Clone this wiki locally