Remote debugging is the process of debugging a program that is running on a different computer. This technique is useful when you are developing a program that runs on a server or in a different environment than the computer on which you are developing the program. This method can be used even for programs running on the same machine as the debugger, which is useful if that program has a complex startup procedure.
Attaching to a remote debuggee is performed by way of the attach dialog. This dialog prompts you for a few pieces of information, some of which will have default values if the fields are left blank.
You can open the dialog box by choosing Session > Attach.
Listening for a connection from a debuggee differs in that the debugger starts listening for a connection from the debuggee, which must occur before the debuggee has been launched.
Note that if the debuggee is not launched within the timeout period defined in the Options dialog, the debugger will cease listening for a connection. A progress bar is displayed to indicate that the debugger is waiting. The listen operation can be cancelled by clicking on the progress bar and clicking the close button.
After attaching to the debuggee, you are ready to begin debugging by setting breakpoints and stepping through your code.
Note that the classpath session setting will temporarily take on the value of the classpath setting in the debuggee. To learn more about the classpath and how it is used, see the Classpath and Sourcepath topic.