Question: I am trying to debug a program running on a remote solaris machine.
I wanted to know path taken by the program during the execution just like stake trace
like 

```
Class A.method1 called method2 in class B
Class B.method2 called method3 in class C
..
...
Control returned from method2 in class B to
method1 in Class A etc

```

We cannot run the program from eclipse since the environment cannot be reproduced since it is a large enterprise level system having many upstream and downstream systems.

I suspect somewhere in the program there is an exception being thrown and that is not handled properly like a empty catch block/not logging or rethrowing the exception.

What is the best way to debug such programs. Please help me with your solutions.

Answer: 
You can use Eclipse to debug remote applications, all you need to do is add a few startup parameters: <http://eclipse.dzone.com/articles/how-debug-remote-java-applicat>
If you want to trace the execution of your Java code you can use a tool called [InTrace](http://mchr3k.github.com/org.intrace/).

InTrace supports outputting the trace from a Java program to disk or over the network to the InTrace UI. This should be ideal for debugging your Java program on a remote solaris machine.

NOTE: InTrace is a free and open source tool which I have written.