views:

272

answers:

3

I have this project that recently started crashing on beta builds of Windows 7. Something about the XAML parser going belly up.

If its easy I would not mind putting a work around in place to compensate for the new .Net behaviour in Windows 7.

How would I go about debugging this on Windows 7?

  • Step 1: Install Windows 7 in a VM.
  • Step 2 : ???? (Install VS? Install VS debugging tools? Install debugging tools for Windows?)
  • Step 3: Profit
A: 

The easiest way would probably be to install VS2k8 and debug it from there. As indicated in the comment already, the problem is most likely not directly XAML-related as any exception upon initialising the window (such as the constructor or data binding) can yield that error. The innermost exception is usually the one that was responsible.

Joey
A: 

If you want to run it in a VM, you probably don't want to install the whole Visual Studio suite inside of the VM just to debug the app. Copy msvsmon.exe from your physical computer to the VM and run it. Then you can launch the program inside of the VM and attach Visual Studio to it from your physical box.

Windbg also supports remote debugging if you're more familiar with that debugger.

Jesse Weigert
A: 

I found the simplest way for me to debug was to install debugging tools for windows and then load up sos manually using:

!load C:\Windows\Microsoft.NET\Framework\v2.0.50727\sos.dll

(note: I was having trouble with !loadby sos mscorwks)

Finally, use the various SOS commands to debug through stuff. Of course for a richer debugging experience you will need PDBs and source.

Sam Saffron