NinjaTrader Debugging with Visual Studio 2008 Tutorial YouTube Video

You need to use a professional addition of Visual Studio or if you use the Express edition you will need to follow the steps outlined here- ad.php?t=15671&highlight=visual+studio

If you have Visual Studio 2005 or 2008 Professional follow these steps-
Step 1- Enable Debugging in NT
Step 2- Bring up a chart and apply the indicators and strategies you want to debug (add your indicators and strategies to the chart)
Step 3- Open Visual Studio (2005 or 2008 Professional Edition)
Step 4- Go to "Tools" and select attach to process and select NinjaTrader.exe (the title should be a chart- ie ES 5min)
Step 5- In Visual Studio open file and go to your ninjatrader directory and select the ".cs" files you want to debug.
Step 6- Add Break points on your selected file (you must add breakpoints in order to debug)
Step 7- Go to your open NT chart and right click and select "reload ninjascript"
Step 8- Visual studio should now pop up going from "running" to debugging" mode and should be focused on your first breakpoint.
Step 9- Add watch points and press F5 to step through.

Remember when debugging that you need to have 1 chart up with the indicators and strategies you want applied to the chart and the debugger starts stepping through at the very first bar on the chart (not the last bar). It is helpful to "add watch" on selected "indicators" and "time" when debugging.