Debug without "Attach to Process" in VS2010 Express
Author: MacroTrader
Creation Date: 1/6/2011 4:36 PM
profile picture

MacroTrader

#1
I've just moved from WL4 to WL6 a couple of weeks ago, so I am just learning C#. What I am trying to do is to debug a strategy using VS2010 Express. I've followed all the steps in the wiki tutorial

http://www2.wealth-lab.com/WL5Wiki/kbAskGlitchDebug.ashx

All the steps are OK, but one. Step No. 13. --In Visual Studio, select Debug/Attach to Process from the menu.-- I've just learned that the express version of VS does not have the "Attach to Process" feature. My question is, is there a workaround to this? How can i debug in VS without this process?

Thanks!


Aditional info: just installed SharpDevelop.....but i does not support debbuging of 64 bits processes. My laptop and WL are both 64 bit.

profile picture

Eugene

#2
Back then when I needed to debug DLLs in Visual Studio Express, I found a workaround on some website. It started the extension of the Glitch's article where you'll find your question answered with a step-by-step procedure.

UPDATE 08/30/2017: Visual Studio 2015 Community has the Attach to Process feature. SharpDevelop has always had it.
profile picture

MacroTrader

#3
Eugene, thank you for the answer. The debugging seens fine now.

I succesfully built the dll and when I am debugging it shows in WL open strategy window. However, after debugging, with the dll placed in WL directory, I close VS, restart WL and the Strategy dll does not show in WL open strategy window.

What can be causing this?
profile picture

Eugene

#4
Let me guess. You have 32-bit and 64-bit editions installed at the same time. For debugging, you started the x64 edition and upon restarting, you launched WL6 x86? Off the top of my head, that's the most logical explanation since these editions are installed in two different folders (but the DLL appears in one of these folders only).

If that applies, check that both installation folders (Program Files and Program Files (x86)) have the same DLL. Also, try rebuilding for Release configuration and manually placing the DLL file(s) to the destination folder(s).
profile picture

MacroTrader

#5
You guess wrong. I only have 64-bit edition installed.

The dll is placed in the right folder:



And it works during debugging. But when I close VS and re-lunch WL, it does not show in WL.

Uploaded with ImageShack.us
note: during debugging it shows where is highlighted



profile picture

Eugene

#6
On rare occasions, weird things like that happen. I had a similar experience when creating a library but it was just the other way around: for a mysterious reason, a Delegate wasn't executing under debugger and the same DLL file worked nicely w/o the debugger.

1. First and foremost - If target framework is .NET 3.5, try downgrading your project to .NET 2.0.

2. As already suggested, try rebuilding for Release configuration and manually overwriting the DLL file(s) at the destination folder.
profile picture

MacroTrader

#7
I am not really sure what I did or didn't but it's back



Uploaded with ImageShack.us

I do not how can affect this, but I have VS Express, and also I have a demo for VS Professional. My guess is that there is some kind of interaction between those two.

Thank you Eugene.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).