Hi there,
I went through your post on how to enable Debugging in VisualStudio. Everything works and I am able to see and launch the C# strategies from VisualStudio in the StrategyMonitor (when clicking on "Open Strategy"), but I can't debug the latter.
When opening and running my Visual Studio strategies in Wealth-Lab, the code (in VisualStudio) gets executed correctly. However, when I try to link my C# file in VisualStudio to the process WealthLabDev.exe, the breakpoints disappear with the mention "No symbol have been loaded for this document".
Do I need to activate anything specific in WealthLab to allow debugging? Or is this due to the fact that I am still on a trial version?
Thank you in advance for your help!
Best,
S.
Size:
Color:
Size:
Color:
Brilliant, thank you Eugene, it all works fine now!
Your second post pointed me toward the right direction.
For those who might have the same issue, the problem was that when attaching the process, in "Attach to", I had manually selected "Native". When changing the latter to "Automatic" (which still pointed me to "Native code"), it suddenly worked. The post which helped me out was
Debugging in Visual Studio .Net.
Thanks again,
S.
Size:
Color:
Glad to help Sebastian.
Size:
Color:
Hi Eugene,
sorry for bringing up the old thread.
I have exactly the same issue with the breakpoints, but did not find a solution yet. This link
http://geekswithblogs.net/dbutscher/archive/2007/06/26/113472.aspx points to a *.PDB file that shall be opened. However I was not able to find a WealthLab.pdb file. Maybe this is already the issue?
Thanks
Daniel
Size:
Color:
Hi Daniel
Long time no hear. Sorry that you're having this issue which VS users may face from time to time (myself included). However, this is not a Wealth-Lab issue at all so your best bet is to read all tips you can find on StackOverflow etc.
"WealthLabPro.pdb" file is the wrong direction: such file never existed in production installs. I'd say that this may happen when your PDB does not match the DLL. Possible reasons include:
1. Version mismatch (debug/release version, see below)
2. Inaccurate PC clock
3. Not enough user rights (must be an administrator to build to the WLD main folder or take ownership of DLL/PDB)
From experience, I'd clear entire solution's output either with "Clear Solution" or manually (when solution contains multiple projects), make sure the PC clock is correct, ensure that the output (DLL and PDB) goes to the WLD main folder and rebuild. I'd veriy the timestamps of DLL/PDB with a file manager. For multi-assembly solutions you have to be extra careful about version mismatch (e.g. release version of a dependency assembly will prevent it from being debugged).
Size:
Color:
Hi Eugene,
indeed, it´s been a while...and it takes longer to get things working again than expected.
Thank you for your prompt response. When I try to build directly to the WLD main folder VS complains that Community.Components cannot be copied and there is no access right to this path. I am admin so this should not be the problem. Any idea what I am doing wrong?
Best
dansmo
Size:
Color:
QUOTE:
VS complains that Community.Components cannot be copied and there is no access right to this path. I am admin so this should not be the problem. Any idea what I am doing wrong?
Sure. Being an admin is not enough. You're not following the instructions precisely:
How can I debug my trading strategies in Wealth-Lab? What does #9 say in
bold?
You must be running Visual Studio as administrator for this. This means: right click the VS shortcut and choose "Run as admin".
Size:
Color:
Okay, this makes me truly feel like an idiot now :-(
It is now bulding to the path but still no success with the breakpoints.
Size:
Color:
At any rate, work out each of my suggestion (DLL
and PDB timestamps, PC clock).
Have you tried not attaching to process but starting WLD as an external program (see
"Edit and Continue" section)? The C.Components solution is preconfigured for this and it's the version I use myself w/o an issue (it just has some bindings to version control removed).
Size:
Color:
Hi Eugene,
I have now tried the alternative route E&C. When starting debug VS shows a message saying that I want to debug a release build of my dll. As you pointed out above this is probably the cause of the issue. However, despite your earlier comments I do not have a clue how to change this to a debug version. What do I have to change?
Thanks
dansmo
Size:
Color:
Size:
Color:
Hi Eugene,
thank you very much, it is now working. As E&C and as attach to process.
Best
dansmo
Size:
Color:
Glad to have helped!
Size:
Color: