How to debug Serviced Component in vb.NET?

G

Guest

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."
Thanks
 
G

Guest

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

Guest

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
 
G

Guest

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
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top