Groups | Blog | Home
all groups > dotnet general > november 2004 >

dotnet general : How to debug Serviced Component in vb.NET?


william
11/29/2004 8:57:01 PM
Could anyone tell me how to debug a Serviced Component (COM+) in .NET?
I tried to attach the debugger to the host process, but failed, got error
"unable to attach the process. There is no managed code running in the
process. In order to attach to a process with the .NET debugger, managed code
must be running in the process before attaching."
Naveen
11/30/2004 1:17:03 AM

Hi William,

A step-by-step process to debug COM+ has been given here
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/html/vxtskdebuggingcom10components.asp

Also, you would find below link useful
http://www.informit.com/articles/article.asp?p=170910&seqNum=1

HTH

With Best Regards
Naveen K S

[quoted text, click to view]
william
11/30/2004 6:59:03 PM
Hi Naveen,
I tried the way in these two articles, but I keep getting error(see error
message inmy first post). In one article it saying need put both COM+ and
client project in the same .NET solution, and another article says the client
and the service should be in same assembly. What do they mean exactly? What I
have done is as follows:
1. create a COM+ using serviced component in VB.NET, compile it, the
register it.
2. add a new project into the COM+ project environment, so that they become
a project group, then do all steps which is described in those two articles.
Is it ok?
Is there any other way to debug it?
Thanks.


[quoted text, click to view]
william
11/30/2004 8:39:02 PM
I tried again, now I didn't get that error, I can set breakpoint in my class,
and the process stopped at breakpoint as expected. But I couldn't exam
variable value. I have a integer variable and a string variable, from me or
Locals window, I saw error in value column "<error:cannot evaluate field of a
proxy object>". I couldn't set value from immediate window either.
What's wrong?

Thanks


[quoted text, click to view]
Naveen
11/30/2004 9:07:02 PM

Hi William..

I don't think any problem should be there if you have followed steps
described in article as I was successful in doing so.

Well, what does your event viewer says? Check the event details for
application and then try to resolve it. If you can't then post here I would
try to help you.

With Best Regards
Naveen K S

[quoted text, click to view]
william
12/1/2004 9:21:01 PM
Hi Naveen,
I did exact what the article said. No event log.
The problem is I couldn't check property's value, no matter it's public or
private.(These properties are declared in class level). I saw <error: cannot
evaluate field of a proxy object> from locals window in debug mode(I am able
to set breakpoint in class, and the program stopped there). I could exam
function level variable(declared in function or sub). Any idea?

Thanks.


[quoted text, click to view]
AddThis Social Bookmark Button