NinjaScript > Editor >

Visual Studio Debugging

Print this Topic Previous pageReturn to chapter overviewNext page

You can debug your NinjaScript objects using Microsoft Visual Studio 2005 or higher.

"Debug Mode" disabled so your DLL is compiled as a release version.
The Express versions of Visual Studio are not supported
NinjaScript objects are compiled into a single DLL, when debugging, a Debug DLL is created which does carry performance impact. Please ensure once you are done with debugging that you recompile with "Debug Mode" disabled so your DLL is compiled as a release version.


1. In the NinjaScript Editor enable "Debug Mode". Be sure to compile the NinjaScript assembly afterwards by pressing "F5" on your keyboard.




2. From within Microsoft Visual Studio select Debug and then select the menu name Attach to Process.... Now you will select NinjaTrader from the process list and press the "Attach" button





Note: Please be sure the "Attach to" field is set to "Automatic: Managed code" or "Managed code".



3. Open the NinjaScript source file within Microsoft Visual Studio and set your break point(s)





4. Run your NinjaScript object in NinjaTrader and it should stop at your break points and all the debugging tools and information should be available to inspect the current state of the code.