views:

174

answers:

3

Okay, weird situation: I need to Debug a VSTO Office Addin. This was written in Visual Studio 2008 Professional and debugging is usually done by loading the Project, Attaching to Outlook.exe and setting breakpoints - works fine.

But I gave a situation where it does not work as expected on one machine, but I do not have VS2008 Pro on that Machine (only Express if that helps, but express will not load the project as the Project type is unsupported), and no chance to use a Remote Debugger.

I just wonder if it's possible to still debug it without loading the project, since I'm "armed" with the .pdb File, Source Code and .dll that was used for this.

Edit: Just for clarification, it's not an exception, it's an if/else block that goes into the else block even though it should not. I would need to set a breakpoint and inspect some .net variables, possibly even modifying them.

+2  A: 

WinDbg will be able to do this, but it's not exactly user-friendly.

Roger Lipscombe
How would you change managed variable's value using WinDbd+SOS? This is what OP might need to do.
Constantin
+1  A: 

If you log the exception with the call stack then you will have a line number and source file. If you can deploy new code on the machine, put some extra logging/tracing in the code.

If this doens't work, use WinDbg to inspect a memory dump, and use the SOS Debugging Extension.

EDIT: Hawkeye.Net might also be helpful in your situation.

Gerrie Schenck
+2  A: 

Another simple trick: Add trace messages to your code (System.Diagnostics.Trace). You will be able to monitor all trace messages using DbgView from Sysinternals/MS.

Might not give the ability to step through your code, but this comes in very handy when analysing problems on a target system where no debugger is at hand e.g. at a customer site.

0xA3