SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Tue May 21, 2019 5:38 pm

All times are UTC + 3 hours




Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Thu Aug 23, 2007 7:41 pm 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6812
This demo video demonstrates how to debug OpenQuant strategies in Microsoft Visual Studio.

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


Regards,
Anton


Top
 Profile  
 
PostPosted: Sun Nov 11, 2007 3:57 am 
Offline

Joined: Sat Nov 10, 2007 11:45 am
Posts: 11
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?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 30, 2007 1:45 am 
Offline

Joined: Sat Jul 24, 2004 12:40 am
Posts: 77
Location: Odessa, Florida
I followed the video and followed the simple instructions and it worked like a charm


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 24, 2008 9:07 pm 
Offline

Joined: Thu Jun 08, 2006 3:56 pm
Posts: 537
Location: BC Canada
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?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 06, 2008 3:19 pm 
Offline

Joined: Thu Nov 06, 2008 3:13 pm
Posts: 8
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


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 19, 2008 8:35 pm 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6812
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


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 25, 2008 12:40 am 
Offline

Joined: Thu Jun 08, 2006 3:56 pm
Posts: 537
Location: BC Canada
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?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 02, 2008 8:28 pm 
Offline

Joined: Thu Jun 08, 2006 3:56 pm
Posts: 537
Location: BC Canada
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.


Top
 Profile  
 
PostPosted: Fri Jun 05, 2009 6:43 pm 
Offline

Joined: Mon Mar 05, 2007 7:02 am
Posts: 58
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


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 08, 2009 3:47 pm 
Offline
Site Admin

Joined: Thu Jul 17, 2003 10:39 am
Posts: 1478
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

_________________
SmartQuant Development Team


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 08, 2009 4:09 pm 
Offline

Joined: Mon Mar 05, 2007 7:02 am
Posts: 58
Alexei - You're correct. That was the problem. I have it resolved now.

Thanks,
Eric


Top
 Profile  
 
PostPosted: Wed Jul 29, 2009 8:32 pm 
Offline

Joined: Wed Jul 29, 2009 8:00 pm
Posts: 7
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,


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 30, 2009 11:23 am 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6812
What version of MSVS have you got? There is no "Attach to process" feature in the Express edition.

Regards,
Anton


Top
 Profile  
 
PostPosted: Mon Aug 22, 2011 11:48 pm 
Offline

Joined: Fri Jan 15, 2010 11:25 pm
Posts: 54
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?


Top
 Profile  
 
PostPosted: Tue Aug 23, 2011 10:52 am 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6812
Hi,

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

Regards,
Anton


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group