

Suspend=y – specifies that the process should wait until the debugger has been connected before proceeding. Server=n – specifies that the process should connect to the debugger (act as a client) agentlib:jdwp=transport=dt_socket,server=n,address=192.168.1.178:5005,suspend=y,onthrow=,onuncaught=Īddress – the IP address and the port of the server end. When starting the process, add the following line to its VM options: The debuggee communicates with IntelliJ IDEA debugger over a socket connection, irrespective of whether the process is local or remote.

Debug agent is an entity responsible for communicating with the debugger. Processes intended to allow debugger connections are started with the debug agent. These requirements are described in more detail in subsequent chapters. You need to have sources of the application.ĭebugging is still possible even when none of these are met, however, there are limitations associated with each of them. The application needs to be compiled with debugging information. The remote process should be started with the debug agent. While not absolutely required, the following prerequisites have to be met to enable full-fledged debugging: Options described in this topic are useful in more complicated cases, such as when we need to debug a process that is running remotely, or a process that has been started in a way that does not allow for debugging. You don't want to attach to a 'hello world' running on the same machine. While IntelliJ IDEA debugger is capable of attaching to any process, it is recommended to prefer a simpler way when there is one. This way gives you the full debugger functionality while sparing you the overhead of extra configuration.


The steps to attach to a process depend on how and where the process was launched.įirst off, if you want to debug a program that can be started from IntelliJ IDEA, the best way to do so is to start a local debugging session. IntelliJ IDEA provides a way to attach the debugger to both local and remote processes.
