Search code examples
vb6clickonceregfreecom

Remote debugging in VB6


Is it possible to remotely debug a process started outside VB6?

The application is a VB6 application with quite a few dll/ocx resources. I am attempting to setup a ClickOnce deployment, using Registration-Free COM, of the VB6 app but have been getting errors when it executes.

My understanding of the way that VB6 redirects COM registerations will probably mean that this is not possible but I thought someone might have a better idea.


Solution

  • I believe that when debugging in VB6, it does not attach to a running binary but instead interprets the code within it's own process. This is why the Task Manager and Win32 APIs show VB6.exe as the running app when debugging.

    Also as you say, VB6 sometimes short-circuits calls to COM libraries so intercepting these calls is not always possible.

    You're probably going to have to resort to intelligent logging (i.e. log the values of variables around the points where the errors you are getting occur in the hope of locating the line of code it occurs on, and/or the state of relevant variables.)

    Good luck