Unable to Debug the COM+ Library Application (C++)

Posted on 2007-07-26
Last Modified: 2013-12-14
Hi Everyone !

I have a web-application which has it own ISAPI implementation.
i.e. backend is COM+ Server Applications, COM+ Library Applications, C# .NET Class Libraries but it uses its own framework to produce the webpages at runtime using CSS Stylesheets, XML Data and XSL.

There are 2 COM+ Server Applications GContext and GSecurity.

Now if i have to debug the C# code then in settings i have mentioned to start dllhost.exe as an external program and gave the GUID of GSecurity as an argument like this /ProcessID:{B1CE1DD1-BA2A-40A5-8B6D-C46CCC88566A}. This way i can sucessfully debug the C# code.

If i have to debug the COM+ Server Applications then i attach the process to correct dllhost.exe with matching Process ID.

Now the problem is that I am not able to debug the COM+ Libraries Applications!!!

On my part i tried following things(point a & b given below) just on hit-n-trial basis but no use:
I followed these steps to debug the COM+ Library Application:
1.) Created a new solution
2.) Added the COM+ Server App (GContext or GSecurity in my case)
3.) Added a COM+ Library App( GISAPI / GUGL / GDAL)
4.) Added breakpoints to all methods.

Now only the breakpoints in the COM+ Server App code were hit and breakpoints in COM+ Library App were never hit .....though COM+ Library was executing normaly .. confirmed with the help of OutputDebugString.

Also i tried to debug the COM+ Library application in the way i an debugging C# code(by starting dllhost.exe as an external program through settings page) but still i can not debug the COM+ Library App.

Can you please suggest me some way to debug the code of COM+ Library Application?

Thanks in Advance
Anugrah A
Question by:anugrah
    LVL 1

    Author Comment

    I spent some time on Debugging of COM+ Libraries Applications and findings were fruitful :)

    In fact we can debug any code i.e. COM+ Server, COM+ Library and even C# Class Libraries without giving that GUID in the settings file. All we have to do is to attach the debugger to dllhost.exe having Process ID of GSecurity (Process ID can be seen in the component services panel -> view status); while attaching the process we have to make sure that native and managed both types are selected.
    LVL 1

    Author Comment

    Hi Administrators / Community Service,

    Kindly  close this quetion and return my points as i have solved the query on my own.
    For the help of other users i have pasted the asnwer here as well.

    Thanks and Regrds
    Atreya A

    Accepted Solution

    Because you have presented a solution to your own problem which may be helpful to future searches, this question is now PAQed and your points have been refunded.


    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    The purpose of this article is to demonstrate how we can use conditional statements using Python.
    Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
    The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now