Blog Stats
  • Posts - 14
  • Articles - 0
  • Comments - 7
  • Trackbacks - 0

 

Thursday, August 23, 2007

Debugging Visual Basic 6 code through Visual Studio 2005

Today I had an issue where an application that as a mixture of .NET, VB6 and C++ code needed to be debugged.  Since the component that I needed to look at was in the VB 6 portion, I attempted to debug from VB6 only to be met with a variety of bizarre errors.

I don't have visibility into the rest of the application, so I continued with the .NET 2005 debugging session, which executed correctly, and noticed that I could set a breakpoint in the VB 6 code when the unmanaged debugging support was turned on.

The debugger visualizations are not quite correct, the .NET objects were showing up a <void>, but I was surprised to see that you could do this at all.  I was able to trace through to the source of the error and move on.
 

 

Copyright © Steven Mitcham