Debugging Visual Studio C# into Visual C++ 6.0

  • Thread starter Thread starter wildThought
  • Start date Start date
W

wildThought

I have created an ASP.Web Service on my machine. This has a COM Object
registered to it that was written in Visual C++ in Visual Studio 6. I
want to have the debugger step into the Visual C++ code. Is this
possible?
 
I have created an ASP.Web Service on my machine. This has a COM Object
registered to it that was written in Visual C++ in Visual Studio 6. I
want to have the debugger step into the Visual C++ code. Is this
possible?

Yes, it should be possible. Assuming that the COM object is in-process (DLL),
you need the following:

1. Ensure that COM object's dll is compiled with debug information,
and that its .pdb file is available on the system where you run the debugger
(e.g. in the same directory with the executable if the application runs on your
machine).

2. When attaching debugger to the process, select both managed (CLR) and Native
debug engines (in Attach To Process dialog). If you do not attach but use
Debug | Start to start debugging, check "Enable unmanaged debugging"
in Project properties | Configuration Properties | Debugging.

After COM object's instance has been created, verify in the debugger's Modules window
that symbols for the dll have been loaded. If they could not be loaded, you can r-click
on the module, choose Reload Symbols and select the .pdb file manually.
 
Thansk for your kind help. I did everything you said, up to the point
of
After COM object's instance has been created, verify in the debugger's Modules window
that symbols for the dll have been loaded. If they could not be loaded, you can r-click
on the module, choose Reload Symbols and select the .pdb file manually.

I am not sure what you mean by this. which debugger the C++ or .Net?
I do have a pdb file that was generated by C++. THis is so
frustrating two days trying to do this am I missing something?

Andy
 
After COM object's instance has been created, verify in the debugger's Modules window
I am not sure what you mean by this. which debugger the C++ or .Net?
I do have a pdb file that was generated by C++.

I mean VS.NET debugger (Modules window is the one at Debug | Windows | Modules menu,
Information column contains information about loaded symbols (if everything is OK,
it should contain "Symbols loaded" message).
If the debugger can find and load symbols (.pdb) for the dll, it should be able
to debug it.

Oleg
 
Back
Top