Using the VS.NET debugger to remotely debug VB6 projects

Using the VS.NET debugger to remotely debug VB6 projects

I would like to debug my VB6 projects remotely using the Visual Studio .NET debugger, but I cannot seem to get it to work. I have followed all of the MSDN info (which only talks about C++ native code debugging), am reading your book and put my symbols in my symbol server. Still, my breakpoints still have a ? in them. Also, when I try to load my *.vbp file in the .NET IDE, it tries to convert it to a .NET project. Any help would be appreciated.

    Requires Free Membership to View

    When you register, you'll begin receiving targeted emails from my team of award-winning writers. Our goal is to provide a unique online resource for developers, architects and development managers tasked with building and maintaining enterprise applications using Visual Basic, C# and the Microsoft .NET platform.

    Hannah Smalltree, Editorial Director

    By submitting your registration information to SearchWinDevelopment.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchWinDevelopment.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

VS.NET can be used to debug a compiled VB6 project. There's no way you can debug a p-code compiled project. Unfortunately, the whole problem is that VB6 does not put proper symbol information into the compiled PDB file, so you can step the lines of your program, but you won't see any parameters or locals.

You can debug locally by first compiling VB6 project. In VS.NET, execute a File -> Open Solution and open the compiled EXE as the solution. Open the file with the code you want to debug and set a breakpoint. Press F5 and you'll be prompted to save the solution file. Save the solution. If the debugger was able to find the symbols, you hit the breakpoint (see the Modules window if symbols were loaded.)

This was first published in August 2003