Remote debugging with Java

Sometimes you have the situation that an issue is only occurring on certain machines or only at a certain time of day. There are a couple of possible methods to investigate such an issue (like: adding extra logging), however I would like to add an other one: remote debugging trough ...

more ...

How to generate a stackdump with GDB

4054760074_609af75332_o I’m not a big GDB guy, but Google always helps:

  • Create a textfile with the following content:

    set height 0
    thread apply all bt
    detach
    quit
    
  • Run the following command:

    gdb $EXE -pid $PID -command $TEXTFILE > $OUTPUTFILE
    

    where:

    • \$EXE is the path to the executable
    • \$PID is the PID ...
more ...