Using Xcode 3.1 on OSX 10.5; is it possible to attach (the debugger) to a running remote process?
I know that it\'s possible to start and debug a remote process (as expl
There is no nice gui for it in XCode but you can do it this way:
Step by step instructions:
Follow Apple's instructions to set up remote debuging:
Find out the process-id of the running instance of your program on the remote box:
ssh "remotemachine" 'ps -x -w -w' | grep "AppName"
(you can also use ARD and ActivityMonitor)
Put a breakpoint to your app main, and start a second instance from the Debugger (on the remote box)
In the GDB console (Run/Console menu) enter:
attach process-id
Now you have you XCode attached to the running process. You can now use the graphical debugger.
(In early XCode, there was no GUI for attaching to local processes, so this trick/hack was the solution...)