View Full Version : using IDE to debug
verge
04-09-2008, 03:13 PM
Hi
I am new to programming and NT - but learning fast.
One of the things that help me to learn programming is the ability to "step through the code"
With step through I mean one can watch as the values in the variables change and can see what if statements for example are executed and which are skipped
Does the NT editor provide the ability to do this? - or rather what program can I use to do this.
I see in the release notes that NT 6.5 now have "Added: Microsoft Visual Studio debugging support" - but then I have also read somewhere that the express version is not supported.
Will the "debug mode" work with SharpDevelop ( a free C# IDE)? If it doesn't please add it to the list of to dos
TIA
NinjaTrader_Ray
04-09-2008, 03:37 PM
Debugging is only supported in MS Visual Studio, the paid version.
Welcome to NinjaScript programming by the way :)
verge
04-10-2008, 02:10 AM
Debugging is only supported in MS Visual Studio, the paid version.
Welcome to NinjaScript programming by the way :)
Thank you for the welcome.
Back to my questions:
Has SharpDeveloper for debugging been added to the list of to dos?
After doing more research I see that NT generally recommend to use the print command to see what is happening in the code - is that correct? If I do not have the expense Visual Studio is that the only thing I can do?
NinjaTrader_Dierk
04-10-2008, 02:16 AM
NT does not support SharDevelop at that time. Thanks for your suggestion. We'll add it to the list of future considerations.
verge
04-10-2008, 02:20 AM
NT does not support SharDevelop at that time. Thanks for your suggestion. We'll add it to the list of future considerations.
Thanks Dierk
Please have a look at my second question as well.
Basically - the only thing I can do is to use the print command to determine the value of variables and what branches of the code is executed when it runs?
I am trying to confirm that I am not missing something that will help me do the above
NinjaTrader_Dierk
04-10-2008, 02:21 AM
>> that NT generally recommend to use the print command to see what is happening in the code - is that correct?
Correct
verge
04-10-2008, 03:20 AM
>> that NT generally recommend to use the print command to see what is happening in the code - is that correct?
Correct
I have searched for more information on how to use Print() to do the following:
I want to print the following values to the output window:
high,low,close, value of a variable
I know this could be done with Print High[0] and print low[0] etc.
The thing is I want them to display in line next to each other - in columns - not in one long column as it does now
Please provide a sample of how this could be done AND show me where this is covered in the help file/videos so that I can search better in future
NinjaTrader_Dierk
04-10-2008, 03:22 AM
Unfortunately there is not such sample available at that time. I suggest consulting the standard MS documents on .NET string formatting.
slyng
04-13-2008, 10:14 AM
Debugging is only supported in MS Visual Studio, the paid version.
Welcome to NinjaScript programming by the way :)
I too am new to the software, but have some background in programming - if using visual studio to debug a strategy, will it be able to access the price data either from market replay or historical data (for backtesting)? And then will you be able to check each variable bar-by-bar?
The reason I ask is that I have some code that I think should lead to a certain action on a chart, but it is not for one reason or another, and i'd love to see which "if statement" or which variable is causing the problem.
Thanks in advance to anyone who has any experience using Visual Studio or who has done this type of thing
NinjaTrader_Ray
04-13-2008, 12:33 PM
Yes and yes.
darthtrader
04-14-2008, 06:12 AM
I know this could be done with Print High[0] and print low[0] etc.
The thing is I want them to display in line next to each other - in columns - not in one long column as it does now
Its just a matter of putting them in the same Print() with a space, ie Print(High[0] + " " + Low[0]) ect.
This gives a little more flexibility:
Print( String.Format( "High={0} Low={1} Open={2} Close={3}",
High[0], Low[0], Open[0], Close[0]
)
);
verge
04-18-2008, 02:24 AM
This gives a little more flexibility:
Print( String.Format( "High={0} Low={1} Open={2} Close={3}",
High[0], Low[0], Open[0], Close[0]
)
);
Regards
Verge