views:

58

answers:

2

Hi, I have just started with java development using Eclipse, when I was debugging this part:

object.methodInAnotherClass(parameters);

The debugger stopped, I understand this won't skip to another class and start debugging that, but what is the other way I can debug my another class?

The same problem is also in CORBA.

So, what is the best way to debug in such cases? By printing the o/p and checking it?

Update:

Q1: How to debug in eclipse when an object is used to invoke a method in some other class? (step into works if a method is called in the same class, so I don't think that's a solution.)

Q2. What is the best way to debug code in a distributed environment like CORBA.

+1  A: 

There should be the "step into" arrow in the debug bar, or the as well as "step over" to jump over one instruction.

I don't know if it was your question since you are also speaking about Corba, maybe you want to know about debugging with Corba.

Vincent Briard
Updated my question :)
zengr
+1  A: 
  1. Put a breakpoint
  2. Start your server/application in debug mode (these 2 points you have already figured out)
  3. You must have the source classes you want to debug. Dynamically generated code is hard to debug

For CORBA specifically, there seem to exist two plugins ORBStudio and EclipseCorba. You could give them a try.

Bozho
Regarding Pt.3. If I have the source class in CORBA, then how should I proceed?
zengr
I'm not sure there is an easy wayto debug CORBA stubs. There seems to be plugins for eclipse, which might be useful, but I haven't used it: http://eclipsecorba.sourceforge.net/ and http://homepage2.nifty.com/interpress/ORBstudio/index000.html
Bozho