.NETGURU
JIT Debugging of remoted objects
Messages   Related Types
This message was discovered on microsoft.public.dotnet.framework.remoting.

Post a new message to this list...

Robert Bouillon
I'm using a remoted object (Actually, it's just a context-bound object on
the same machine, but same concept). When an exception is thrown, I can only
step into the last local call. I can't actually step into the remoted
object's code where the exception was thrown. If I set a breakpoint,
however, in the remoted object I will can step through it: I just can't view
the contents of the remoted object.

So I have 2 questions:

Is there a way I can enable VS .NET to capture, and break, at the remoted
exception on the object server rather than the last location of the local
call to the remoted object?

I'm throwing a custom exception and throwing it from within my remoted
object. On my client/host application, though, I'm actually receiving an
"Object reference not set to an instance of an object" exception. The stack
trace shows my original, custom exception being thrown, though.

Reply to this message...
 
    
Lord2702
Sat. Sep. 11, 2004 9:50 PM PT

Start your server, which hosts your remote object. In your client
application, set a breakpoint just before the proxy method call, once you
arrive at this break point, go to debug menu and then process, find your
server process which is running, select this process by clicking on it then
click attach. follow the rest of the dialog, once you attach to your server
process, on your proxy method, press F11 you should be able debug your
remote object method.

Good Luck.

"Robert Bouillon" <Click here to reveal e-mail address> wrote in message
news:Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
    
Robert Bouillon
I'm using a local dll that believes itself to be remote, because it's a
context-bound object. It's still within my current application domain. In
other words, I'm already attached to it. I can only step into it, however,
if I set a breakpoint within the code of the remoted object.

Here's an illustration (Not real code, note tested):

01] class MyRemotedObject : ContextBoundObject
02] {
03] {...}
04] public void DoSomething()
05] {
06] throw new Exception("Something bad");
07] }
08] {...}
09]}
10]
11]MyRemotedObject m = new MyRemotedObject();
12]m.DoSomething();

When calling DoSomething, my code breaks at line 12, and I can't step deeper
into the call stack. VS is aware that it's a deeper call, though, because I
can view the procy call in the call stack window if I select "Show Non-User
Code". If I set a breakpoint within DoSomething though, I can step around in
it, I just can't view the values of the local members.

Can I get VSS to step into the ContextboundObject for me and break there
instead somehow?

--ROBERT

"Robert Bouillon" <Click here to reveal e-mail address> wrote in message
news:Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
 
System.ContextBoundObject
System.Exception




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification