Harish
Harish

Reputation: 7969

How remote debugging is implemented in general

I have been using remote debugging from JDeveloper to Weblogic server for quite sometime and found it's very useful. But I am interested in understanding how remote debugging is implemented technically.

When I make any java code change and rebuild the class in jdeveloper on a remote machine from where I am debugging the server, the code changes are automatically picked up the server. How does this happen? Does the tool send the compiled java class on the network to server?

Can any one please share any documents / links explaining the technicalities of remote debugging.

Thanks & Regards, Harish

Upvotes: 2

Views: 751

Answers (1)

Eli Bendersky
Eli Bendersky

Reputation: 273716

Not sure if you're asking about remote debugging in general, or for the particular tools you're describing.

I don't know much about Java/jdeveloper, but in general remote debugging works as follows:

  • On the target machine, a special server process hooks into the executable you want to debug, just like a debugger would when running locally. This server doesn't have to know about symbols and source code, just have the executable running. Using system commands it can ask it to stop and examine its memory space.
  • On the host machine the debugger itself runs and also has a copy of the executable, and of its source code. The debugger communicates with the server on the target machine using some kind of protocol (TCP/IP or maybe serial for embedded devices) and asks it to step, examines certain memory locations it knows about from the debug info in the executable, can show the source code being debugged to the user, etc.

Read, for example, on gdbserver which is probably the most popular remote debugging server out there.

Hope this helps :)

Upvotes: 1

Related Questions