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.
- 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 a list of all currently debugging applications, select from the main menu. Refer to the section Viewing Running Processes for details.
General debugging steps
- Configure the dependencies and libraries to be passed to the compiler and generate the debugging information.
- Configure common debugger behavior, including stepping speed, class reloading policy, or scrolling of the editor canvas.
- Configure the debugger options.
- To debug CoffeeScript, TypeScript, and
Dart code, you need source maps generated in addition to the
JavaScript code.
Source maps
set the
correspondence between lines in your original code and in the generated JavaScript code, otherwise
your breakpoints will not be recognised and processed correctly.JavaScript and source maps are generated by transpiling the original code either manually using the File Watcher of the type CoffeeScript, or by the built-in compiler (for TypeScript), or through integration with the Pub Serve tool (for Dart). After that, you can debug the output JavaScript code. See Transpiling CoffeeScript to JavaScript, Transpiling TypeScript to JavaScript, and Using Integration with the Pub Tool for details.
- Define a run/debug configuration for the application to be debugged.
- Create breakpoints in the source code.
- Launch a debugging session.
- Pause or resume the debugging session as required.
- During the debugger session, step through the breakpoints, evaluate expressions, change values on-the-fly , examine suspended program, explore frames, set watches , reload classes, and customize views .
After you've started a debug session, the
icon that marks the
Debug tool window toggles to
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.
See Also
Procedures:
Reference:
- Compiler
- Settings/Preferences dialog. Debugger
- Debug Tool Window
- Settings/Preferences dialog. Editor General
Concepts: