PC Review


Reply
Thread Tools Rate Thread

Debugging Visual Studio C# into Visual C++ 6.0

 
 
wildThought
Guest
Posts: n/a
 
      22nd Jan 2007
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?

 
Reply With Quote
 
 
 
 
Oleg Starodumov
Guest
Posts: n/a
 
      23rd Jan 2007

> 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.

--
Oleg
[VC++ MVP http://www.debuginfo.com/]




 
Reply With Quote
 
wildThought
Guest
Posts: n/a
 
      23rd Jan 2007
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

Oleg Starodumov wrote:
> > 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.
>
> --
> Oleg
> [VC++ MVP http://www.debuginfo.com/]


 
Reply With Quote
 
Oleg Starodumov
Guest
Posts: n/a
 
      24th Jan 2007
> > 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++.


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




 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Debugging From Visual Studio Just Me Microsoft ASP .NET 0 30th Mar 2008 09:40 PM
How to take an IE rendered screenshot of a website with visual studio .net 2002 or visual stuido .net 2003? I can't install visual studio .net 2005 on this computer. Daniel Microsoft Dot NET 4 17th May 2007 08:56 PM
How to take an IE rendered screenshot of a website with visual studio .net 2002 or visual stuido .net 2003? I can't install visual studio .net 2005 on this computer. Daniel Microsoft Dot NET Framework 1 14th May 2007 09:05 PM
How to take an IE rendered screenshot of a website with visual studio .net 2002 or visual stuido .net 2003? I can't install visual studio .net 2005 on this computer. Daniel Microsoft C# .NET 0 14th May 2007 08:45 PM
Visual Studio Debugging SirPyros Microsoft VB .NET 0 19th Apr 2005 09:57 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:46 PM.