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 debug remotely with eclipse, see [this](http://www.eclipsezone.com/eclipse/forums/t53459.html)
in such cases I have used Btrace <https://dzone.com/articles/introduction-btrace> , it doesn't require you to setup a remote debugger, nor to have the source code of your Java application. 

Another way is to run jdb <https://docs.oracle.com/javase/7/docs/technotes/tools/windows/jdb.html> and attach to the process - but you must enable the process JVM to use jdwp -agentlib:jdwp=transport=dt\_shmem,server=y,suspend=n

In general I agree that the JDK is lacking a professional built-in tracing/debugging tool