IntelliJ IDEA
 
Get IntelliJ IDEA

Start the debugger session

Last modified: 27 November 2024

Starting a debugger session is very similar to running the program in normal mode. The debugger is attached behind the scenes, so you don't have to configure anything specific to start a debugger session. If you are able to run your program from IntelliJ IDEA, you will also be able to debug it using the same configuration.

Each time you debug a program, the debugger session is based on a run/debug configuration. It allows you to configure parameters and actions for launching the application. For example, you can specify to build the application every time you start a debugger session or use the previously compiled code. You can also use any VM options, custom classpath values, and so on (as long as the selected run/debug configuration supports this).

If you are debugging code that is based on a framework or runs on an application server, it is recommended to use the run/debug configuration type intended for this type of application. When you launch a debug session, IntelliJ IDEA adds a VM option that allows the debugger to attach. Given that a particular framework may fork the process, there is no guarantee that the target process will get the required VM option if an improper run/debug configuration type is used.