SmartQuant Discussion
http://www.smartquant.com/forums/

Debugging OpenQuant strategies in Visual Studio
http://www.smartquant.com/forums/viewtopic.php?f=44&t=5851
Page 1 of 2

Author:  Dr. Anton Fokin [ Thu Aug 23, 2007 7:41 pm ]
Post subject:  Debugging OpenQuant strategies in Visual Studio

This demo video demonstrates how to debug OpenQuant strategies in Microsoft Visual Studio.

http://www.smartquant.com/products/open ... /msvs.html


Regards,
Anton

Author:  VagyokC4 [ Sun Nov 11, 2007 3:57 am ]
Post subject:  Re: Debugging OpenQuant strategies in Visual Studio

Dr. Anton Fokin wrote:
This demo video demonstrates how to debug OpenQuant strategies in Microsoft Visual Studio.

http://www.smartquant.com/products/open ... /msvs.html

Regards,
Anton


I followed those instructions to the T, and in Vista (w/ UAC OFF) I don't break. OpenQuant runs and completes. Visual Studio 2005 (Vista-SP) sits waiting in a "running" mode.

Any other suggestions?

Author:  Dytiscus [ Fri Nov 30, 2007 1:45 am ]
Post subject: 

I followed the video and followed the simple instructions and it worked like a charm

Author:  kkkwj [ Fri Oct 24, 2008 9:07 pm ]
Post subject: 

I just tried following the video steps, and they did not work for me. I am running VS 2005 and OQ 2.6.2 on XP. I don't think I'm doing anything special with my strategy.

Nothing in the video says anything about how to set up the VS solution/project. I created a little project that just contains the code.cs file as a link to its real location in the OQ APPDATA directory. I also added enough references to the VS project to get Intellisense to work, and for the project to compile.

Anton, is it possible for you or one of the guys to update the video and this thread with more info on how to get debugging with VS 2005 or VS 2008 to work with recent OQ versions?

Author:  The Kid [ Thu Nov 06, 2008 3:19 pm ]
Post subject: 

Hello,

I'd be very very interested in this as well.
I'm just evaluating SmartQuant for now and debugging capability is such a massive time saver that it's a must have for me.

Thanks so much

Author:  Dr. Anton Fokin [ Wed Nov 19, 2008 8:35 pm ]
Post subject: 

kkkwj wrote:
I just tried following the video steps, and they did not work for me. I am running VS 2005 and OQ 2.6.2 on XP. I don't think I'm doing anything special with my strategy.

Nothing in the video says anything about how to set up the VS solution/project. I created a little project that just contains the code.cs file as a link to its real location in the OQ APPDATA directory. I also added enough references to the VS project to get Intellisense to work, and for the project to compile.

Anton, is it possible for you or one of the guys to update the video and this thread with more info on how to get debugging with VS 2005 or VS 2008 to work with recent OQ versions?


OQ 2 is MSVS 2008 / .NET 3.5 application, so perhaps you need to debug with MSVS 2008? Have you tried it?

Regards,
Anton

Author:  kkkwj [ Tue Nov 25, 2008 12:40 am ]
Post subject: 

Hi Anton, I just tried "it" (meaning an approximation of the process shown in the video) on my machine, with OQ v2.6.2 and VS 2008. The debugger went into debug mode on the attach operation, and would accept a breakpoint from me (I put it in OnStrategyStart). But the simulation ran straight through without stopping at the breakpoint.

Perhaps the difference is in how I use VS? I actually have a little VS project defined beside the oqp file, so that I can add references and compile the code.cs file in VS before I try to run it in OQ. The VS project links to the actual code.cs file in the OQ AppData directory. I also have a few other code.cs files open in VS (but they are not active when I do the Attach process).

I also have a dual core cpu, would that have any effect? Maybe Windows puts OQ on one core and VS on the other?

Does the video example (1) use any sort of a VS project at all, or (2) run on a dual core machine?

Author:  kkkwj [ Tue Dec 02, 2008 8:28 pm ]
Post subject: 

I finally got VS 2008 to debug with OQ. To make it work, you must change the default code types that VS tries to debug.

To change the defaults, you have to specify new ones in the dialog that pops up when you Attach to Process. Look for the dialog line that says "Attach To: Script, T-SQL" about halfway down the dialog.

The default (at least on my VS 2008 Pro version XP) was "Script, T-SQL", which will not work.

As others have kindly reported in the forums, you need to pick "Managed Code" (which apparently is incompatible with Script). I tried it with ONLY Managed Code enabled, and debugging worked.

Not to create more work for the SQ guys :-), but I think the demo video on the website that shows how to do it should be revised to (1) move more slowly---it moves so fast that you have to watch it 10 times to see the precise moves, and (2) to include showing that the Managed Code option must be enabled in order for things to work.

Author:  EDetterman [ Fri Jun 05, 2009 6:43 pm ]
Post subject:  Problems Debugging in VS 2008

I am trying to debug a system I built in OpenQuant by using the ‘Attach to process’ Debug menu item in VS 2008 to attach VS to OpenQuant.

Everything works fine until I try to Stop Debugging. When I stop debugging, it closes OpenQuant. Also, I don’t have the option to ‘Detach All’ under the Debug menu, its greyed out.

I don’t remember this happening when I was doing the same thing in VS 2005. I searched around on the net for a solution or option on this but wasn’t able to find anything. Any ideas on what could be causing this?

Thanks,
Eric

Author:  Alexei Kurov [ Mon Jun 08, 2009 3:47 pm ]
Post subject: 

Hi,

It works for me(Detach All menu item enabled) with default settings of msvs 2008.
May be you have attached the debugger not in 'automatic mode' and msvs cannot detach from the process?

Regards,
Alex

Author:  EDetterman [ Wed Jul 08, 2009 4:09 pm ]
Post subject: 

Alexei - You're correct. That was the problem. I have it resolved now.

Thanks,
Eric

Author:  neo_trader [ Wed Jul 29, 2009 8:32 pm ]
Post subject:  Not getting the Attach to Process dialogue box in Debug

Hi Anton,

I watched the demo and tried following the steps. I get stuck at the point where we have to select the "Attach to Process" from under the Debug taskbar. I don't have that option under Debug. Could you please help me out. I am using OQ2 / MS VS 2008.

Thanks,

Author:  Dr. Anton Fokin [ Thu Jul 30, 2009 11:23 am ]
Post subject: 

What version of MSVS have you got? There is no "Attach to process" feature in the Express edition.

Regards,
Anton

Author:  GP2X [ Mon Aug 22, 2011 11:48 pm ]
Post subject:  Re: Debugging OpenQuant strategies in Visual Studio

This worked for me until I upgraded to the latest 3.x. Now every time when I set a breakpoint in VS2008, it always warned me that "There is no symbols to load for this document". As I remember in Ninja trader, I had to enable the debugging switch before compiling. Did you add the same feature(for performance?) in OQ so it doesn't produce debugging information as default now?

Author:  Dr. Anton Fokin [ Tue Aug 23, 2011 10:52 am ]
Post subject:  Re: Debugging OpenQuant strategies in Visual Studio

Hi,

I believe you should use MSVS 2010 with OQ 3.x since we switched to .NET 4.0 in 3.x

Regards,
Anton

Page 1 of 2 All times are UTC + 3 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/