RightEdge Forums
Main     Home          Members     Calendar     Who's On

Welcome Guest
        


«««1234

Debugging Strategies Expand / Collapse
Message
Posted 5/13/2010 08:49:13 Post #11633
 

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member
I've been having this problem intermittently as well, and I don't know how to fix it. It's pretty frustrating as I spend a few hours trying to get the debugger to work before actually being able to do anything.

I've tried loading the CS file just as a single file or loading it as a project in VS and in either cases it doesn't. Strangely yesterday after a few times of just restarting one program and then the other it started to work. Today, it's not working again.

The debugger should hit when its just opened as file, but it does not. Please advise.

Note: When i look in the modules window everything within the rightedge folder has "skipped loading symbols." Should there be a reference here to the CS file for my strategy or is that implicit somewhere? Please help, thanks!
Posted 5/13/2010 09:57:55 Post #11636
 

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member
Ok -- solved:

Bill, this does not involve the Express editions at all. It is all done right within RE!!
- Right click the project. Under properties check "Generate Debug Info" (from Daniel's post).
- At the top of your strategy (first line) include '#define DEBUG'. (I don't know whether the 'Generate' is still needed??)
- Set 'using System.Diagnostics'
- In MySymbolScript put 'public bool dbg=true;' Set this to 'false' to not invoke the debugger.
Where ever you want the debugger invoked put this: (There can be more than one instance.) (This starts the debugger if it is not already running.)
if(dbg==true) System.Diagnostics.Debugger.Break();
You may be given a choice of debuggers; pick 2005. BEFORE stopping the debugger use the Immediate window to set dbg=false. Hit "Continue". (After that you may be able to click "Stop debugging" and close the debugger; I just always leave it alone.) Also consider 'Debugger.Log()' and 'Debugger.Launch()'.

Nifty.

[I should have added that the Debugger is part of the .NET Framework, which is why neither an Express VS nor the SDK are needed.]



-Pete
(See also rightedge-ats Yahoo group )
Posted 7/6/2010 18:13:09 Post #11895
 

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member
I'm probably way behind the curve on this. Looks like an old post. Are there updated docs for debugging with VS? I followed the steps here with the simple "mySystem" in the tutorial, set some breakpoints, but none of them are being tripped when I run a simulation. I followed the steps:

create RE trading system "MySystem" from the tutorial
put dummy call in Startup() method
use the RE option to create VS project
..in VS
attach to RE process
..in RE
run simulation

The simulation runs but the breakpoints are never hit?
Posted 7/6/2010 21:32:19 Post #11897
 

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member
Excellent! Fault my lack of scholarship. I found the entry in the help file. Followed the directions; breakpoints hit!
« Prev Topic | Next Topic »

«««1234

Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: billb, young, dplaisted

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 2:16pm

2005-2007 © RightEdge Systems