IntelliJ IDEA 2017.3 Help

Debugging

Overview

This section describes the procedures that are common for various types of applications. For details on debugging applications in the supported frameworks, refer to Language and Framework - Specific Guidelines.

IntelliJ IDEA provides a full range of facilities for debugging your source code:

  • Breakpoints in Java.
  • Breakpoints in JavaScript.
  • Multiple simultaneous debugging sessions.
  • Customizable breakpoint properties: conditions, pass count, etc.
  • Frames, variables, and watches views in the debugger UI.
  • Runtime evaluation of expressions.

If you want to see the list of all currently debugging applications, select Run | Show Running List from the main menu. Refer to the Viewing Running Processes section for details.

General debugging steps

  1. Configure the dependencies and libraries to be passed to the compiler and generate the debugging information.
  2. Configure common debugger behavior, including stepping speed, class reloading policy, or scrolling of the editor canvas.
  3. Configure the debugger engine.
  4. To debug CoffeeScript, TypeScript, and Dart code, you need to generate a source map for it. This will set the correspondence between lines in your original code and in the generated JavaScript code. If no source map is generated, your breakpoints will not be recognized and processed correctly.
  5. Define a run/debug configuration for the application to be debugged.
  6. Create breakpoints in the source code.
  7. Launch a debugging session.
  8. Pause or resume the debugging session as required.
  9. During the debugger session, step through the breakpoints, evaluate expressions, change values on-the-fly, examine suspended program, set watches, reload classes, and customize views.

After you've started a debug session, the /help/img/idea/2017.3/debug.png icon that marks the Debug tool window toggles to /help/img/idea/2017.3/debug_active.png to indicate that the debug process is active.

Note that IntelliJ IDEA lets you debug decompiled code in the same way as your normal source files, provided that it contains line number attributes.

Last modified: 11 October 2017

See Also