How do I debug my JavaScript that is being executed by Chutzpah/PhantomJS

Greg picture Greg · Sep 24, 2012 · Viewed 7.7k times · Source

I am using Chutzpah to execute my JavaScript unit tests.

I reference paths to my source files and below have a series of tests. Text Explorer in Visual Studio lists my tests and I can execute them directly from the IDE, so everything seems to be working correctly.

However I would like to step into the source code that is being executed when my tests are run.

Is this possible?

Answer

Matthew Manela picture Matthew Manela · Sep 25, 2012

Update: Version 4.1.0 of Chutzpah adds integrated VS debugging.

enter image description here


This is not currently possible using Chutzpah. The best you can do is to install the context menu extension which will add a "Open In Browser" right click option. Then you can use the browser's built in debugging tool to step through the code.

I would love to add an integrated way to plug into the VS debugging system but have not figured out how to do that yet.