Click here to Skip to main content
15,889,863 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to debug COM component. I have the code of the component. I need to put breakpoint to the function to stop application to debug. How can i do it in Visual Studio 6.0? Application does not stop, when i put the breakpoint. Can you help me?
Posted

Hello Sergey,

I guess your not running the COM component from within VS. To debug the COM component you'd have to attach the debugger to the process of the component.


Added:

http://www.codeguru.com/forum/showthread.php?t=322238



Cheers,


Manfred
 
Share this answer
 
v2
Comments
[no name] 8-Dec-10 2:32am    
Is there any difference when debuging in release configuration with debug information (program database) and debug configuration with the same options except information of mfc and atl libraries symbols?
Manfred Rudolf Bihy 8-Dec-10 2:39am    
You got me there! Sorry Sergey, that's beyond my competence in these matters. Are you now able to debug your COM component now?
[no name] 8-Dec-10 2:45am    
I run the COM component from within Visual Studio 6.0. Before running, i have set COM component's project as active. Should i register component from Visual Studio output directory instead of installed program? It seem to me "yes".
[no name] 8-Dec-10 2:51am    
It shows disassembly code even after registering in output location.
Manfred Rudolf Bihy 8-Dec-10 2:51am    
Man you got me again. This is getting embarrasing :). To be honest I don't really know, but to make an educated guess, I would also say yes to registering the version in the projects output directory. It would be awfully nice of you to leave a short comment as to how you made it work (that is when you get it to work of course).
Hi,

There's a lot of solution to debug your com.

Personally I add a call to "DebugBreak ();" on the COM main class constructor and I start a sample programme, the debug windows appear and I select the existing VC session (session with the com code loaded).
Vc break the code on DebugBreak line...

It's work with all programs like service, COM, ActiveX DirectShow filter...

Bye...
 
Share this answer
 
Create an EXE that uses the COM Object, open the COM Project, Execute it and it will ask for the exe, point it to the exe created which will use this COM Object and you can do whatever you wannna do
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900