Debugging a Strategy with Visual Studio Express 2013
Author: WW
Creation Date: 8/3/2014 5:22 PM
profile picture

WW

#1
Hello,

Debugging a Strategy with Visual Studio Express 2013 or wealth lab 6.6.

In the past I used Win XP 32 bit and Wealth Lab Developer 5 32 bit Visual Studio Express 2008. Everything worked well an I could debug with visual studio.

Now I upgraded to Win 7 professional 64 bit and Wealth Lab Developer 6.6 64 bit and Visual Studio express 2013. I do it this way:

1. build a class library
2. project refer to wealth lab.dll and wealth lab indicators.dll
3. build a class helper
4. add “using wealth lab instructions”
5. build a new guid
6. Is .NET Framework 4.5 established?
7. output path is „Program Files\MS123\Wealth-Lab Developer 6\”
8. start Wealth Lab
9. visual studio Attach to prozess Wealth-Lab-Developer.exe
10. wealth lab open strategie; there is no special symbol
11. I didn’t forget to save. I already tried different ways for saving: save in project visual studio, save in wealth lab main folder 6. Unfurtunatly nothing worked.

Did I forget something or do the systemn doesn’t work with the 64 bit version?

The following must have been droped out with Visual Studio 2013. Is this the case?

QUOTE:
For example, the action sequence for VS C# 2005 Express Edition will look like this:

Suppose your project file name is "TestLibrary.csproj". Create a file "TestLibrary.csproj.user" and put it to the very same directory where "TestLibrary.csproj" is. (In other words, name it after your project file and append an extra extension .user). Then, open up the new file in Notepad or any other text editor, paste the following XML code and save the file:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<StartAction>Program</StartAction>
<StartProgram>c:\Program Files\Fidelity Investments\Wealth-Lab Pro 6\WealthLabPro.exe</StartProgram>
</PropertyGroup>
</Project>

For Wealth-Lab Developer 6, substitute the text in bold with the following one: c:\Program Files\MS123\Wealth-Lab Developer 6\WealthLabDev.exe

profile picture

Eugene

#2
Hi,
QUOTE:
Unfurtunatly nothing worked.

I read your detailed log, not expecting to find the "it doesn't work" mystery in the end. So what didn't work exactly? Got a specific error message or something else?

QUOTE:
The following must have been droped out with Visual Studio 2013. Is this the case?

Well, yes, it isn't required any longer since Express users now have the Attach to Process debugging. However, this step won't hurt if you like to start WLD6 automatically by hitting F5 (assuming you've placed the built file ino the WLD6 main folder) and don't care about attaching to process.
profile picture

WW

#3
Hi Eugene,

this is a detail from the error massage that apears when I finish attach to prozess Wealth-Lab-Developer.exe. Unfortunately the massage is in german.

"WealthLabDev.exe" (CLR v4.0.30319: WealthLabDev.exe): "C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll" geladen. Das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
"WealthLabDev.exe" (CLR v4.0.30319: WealthLabDev.exe): "C:\Program Files\MS123\Wealth-Lab Developer 6\MetaLib.dll" geladen. Das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
"WealthLabDev.exe" (CLR v4.0.30319: WealthLabDev.exe): "Microsoft.GeneratedCode" geladen.
"WealthLabDev.exe" (CLR v4.0.30319: WealthLabDev.exe): "Microsoft.GeneratedCode" geladen.
"WealthLabDev.exe" (CLR v4.0.30319: WealthLabDev.exe): "C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization.Formatters.Soap\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.Serialization.Formatters.Soap.dll" geladen. Das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
"WealthLabDev.exe" (CLR v4.0.30319: WealthLabDev.exe): "C:\Windows\Microsoft.Net\assembly\GAC_MSIL\mscorlib.resources\v4.0_4.0.0.0_de_b77a5c561934e089\mscorlib.resources.dll" geladen. Das Modul wurde ohne Symbole erstellt.
"WealthLabDev.exe" (CLR v4.0.30319: WealthLabDev.exe): "Microsoft.GeneratedCode" geladen.
"WealthLabDev.exe" (CLR v4.0.30319: WealthLabDev.exe): "Microsoft.GeneratedCode" geladen.
"WealthLabDev.exe" (CLR v4.0.30319: WealthLabDev.exe): "C:\Windows\Microsoft.Net\assembly\GAC_MSIL\WindowsFormsIntegration\v4.0_4.0.0.0__31bf3856ad364e35\WindowsFormsIntegration.dll" geladen. Das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
"WealthLabDev.exe" (CLR v4.0.30319: WealthLabDev.exe): "C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms.resources\v4.0_4.0.0.0_de_b77a5c561934e089\System.Windows.Forms.resources.dll" geladen. Das Modul wurde ohne Symbole erstellt.
"WealthLabDev.exe" (CLR v4.0.30319: WealthLabDev.exe): "C:\Windows\Microsoft.Net\assembly\GAC_MSIL\UIAutomationTypes\v4.0_4.0.0.0__31bf3856ad364e35\UIAutomationTypes.dll" geladen. Das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
"WealthLabDev.exe" (CLR v4.0.30319: WealthLabDev.exe): "Microsoft.GeneratedCode" geladen.
"WealthLabDev.exe" (CLR v4.0.30319: WealthLabDev.exe): "C:\Windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework.Aero\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.Aero.dll" geladen. Das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
"WealthLabDev.exe" (CLR v4.0.30319: WealthLabDev.exe): "C:\Windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework.resources\v4.0_4.0.0.0_de_31bf3856ad364e35\PresentationFramework.resources.dll" geladen. Das Modul wurde ohne Symbole erstellt.
"WealthLabDev.exe" (CLR v4.0.30319: WealthLabDev.exe): "C:\Windows\Microsoft.Net\assembly\GAC_MSIL\UIAutomationProvider\v4.0_4.0.0.0__31bf3856ad364e35\UIAutomationProvider.dll" geladen. Das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
Der Thread 0xe4c hat mit Code 259 (0x103) geendet.
Das Programm "[2636] WealthLabDev.exe" wurde mit Code 0 (0x0) beendet.
profile picture

Eugene

#4
1. Double check that your project is not targeting "x86" only on now 64-bit system.
2. Make sure that your PC clock is correct.

3. Also, do our our samples (as opposed to your solution) function correctly?
profile picture

WW

#5
Visual Studio is in the folder Programs (x86), it is 32 bit (Windows on Windows 64).Shall I install Visual Studio in programs where Wealth Lab is located? How should I go on?
profile picture

WW

#6
PC clock is correct
profile picture

Eugene

#7
I was not asking where VS is installed. The suggestion was to double check your build configuration which should be "AnyCPU" (not targeting "x86").

Also please see my question #3 above.
profile picture

mrsic

#8
Hi,

I am not a programmer but i do my best.
I am stuck at point 6 (How can I debug my trading strategies in Wealth-Lab?). How looks the content of a StrategyHelper?
For now it looks like this, See Attachment.


greetings damir.
profile picture

Eugene

#9
Hi,

Don't look any further:

Home - Strategies.ActiveTrader

This is a fully functional Strategy library with enough examples. Make sure you're logged in to the Wiki to see the green Attachments button on that page.
profile picture

mrsic

#10
Hi Eugene,

I used one of these samples but i am getting always the same message.
See Attachment. (only in german, sorry for that)

Debugging can't be started; an execute project is required.I dont know what to do, can you help me with them.

Thanks.

greetings damir
profile picture

Eugene

#11
Damir,

Since the example project is very old, it has to be adjusted to suit WLD 6.9 and .NET 4.5-4.7.

1. In Project Properties > Debug, make sure that "Start external program" is checked and it points at c:\Program Files\MS123\Wealth-Lab Developer 6\WealthLabDev.exe.
2. Also, all the References are also old and point at the WLD5 folder and have to be updated.
3. Finally, the project must be reconfigured to target .NET 4.5 or higher (it created during .NET 2.0 times).

If you find something difficult, I've updated the project and uploaded it to the Wiki. Please simply delete your directory and download again.

P.S. If you have the ActiveTrader Strategy pack extension installed you will have problems. Uninstall it before compiling this project.
profile picture

mrsic

#12
Eugene,

@debug works but when i am starting the debug in my own strategy he says, Wealth Lab is always running!

@Active Trader Strategy 8 Errors. ".....\Wealth-Lab Developer 5' is denied."

NET 4.5.

Do i have something forgotten?


profile picture

Eugene

#13
Sorry, the project file contained one more reference to the WLD5 folder. Fixed now, please download again.
profile picture

mrsic

#14
Eugene,

until here is everythink okay. "no errors and warnings."
If i am starting the debug process in VS - Wealth lab automatically starts.I think this is normal (tutorial). But i can't see any breakpoints and F10, F11 is not in used. I can, stop, break or contnue the debugging process. What i am doing wrong?

greetings damir
profile picture

mrsic

#15
Eugene,

it works fine.

Thank you for your help.

Greetings Damir.
profile picture

Eugene

#16
Damir,

Glad you were able to set it all up.

Cheers.