Home> Products> IntelliJ IDEA> Features & Screenshots> Compiling/ Running/ Debugging

Compiling/ Running/ Debugging


IntelliJ IDEA 7 comes with the totally reworked, even better Java code debugger. Brand new user interface, which lets you keep the complete track of the debugging process via the flexible layout of Console, Variables, Frames and Watch views, beefed up with Sel ective Step Into for better complex statement calls debugging, object instance markup and automatic variable watching, plus smart recursion analysis in the Stack view, and more - everything tied together to make up the productive application debugging environment.

Compilation

Multiple compilers supported

screenshot

In IntelliJ IDEA, you have the option of compiling your sources with the javac, jikes, or eclipse compiler. No matter which one you use, your sources will be compiled against the target JDK libraries.

to the top

Dependency-based make

Using dependency-based make will get IntelliJ IDEA to automatically re-compile all modified classes together with those depending on them.

to the top

Possibility to specify target JDK

The application you are developing with IntelliJ IDEA may have to be compatible with an arbitrary version of JDK. Now, with the new, module-based, project structure, this requirement may apply even to particular modules. This can be easily achieved with the help of the target JDK option, so that your project or a separate module will be compiled, run and debugged under a specified JDK version, independently of the JDK used for running IntelliJ IDEA itself.

to the top

Ability to automatically copy resource files from the source to output directory

Sometimes you might need some of your resource files located in the source directories to be automatically copied to the project output. IntelliJ IDEA provides you with a flexible option to specify patterns for the necessary files (with the possibility to use regular expressions) so that not all but only the proper resources are copied.

to the top

Quick and easy navigation from compilation errors to the corresponding source

The convenient compilation results view enables you to navigate to the source of any compilation error or warning in the code with a single key-stroke. Even while in the editor, you can easily navigate through all of your compilation errors with the help of the next/previous shortcuts.

screenshot

to the top

Running and Debugging

New, flexible user interface layout

Reworked user interface enhances usability and streamlines the debugging process.

debug Flexible Tool Window

to the top

Smart Selective Step Into

Debugging of complex call statements is made easier than before: now you can select which part of the call you want to debug.

Smart Step Into

to the top

Customizable marks for object instances

Keep you focused on the debugging process and let track different object instances at ease.

to the top

Intelligent recursion analysis

This feature simplifies debugging with highlighting of recursive calls in Frames view, letting you easily analyze them and find probable cases of infinite recursion.

Debugger Recursion

to the top

Multiple execution profiles

screenshot

IntelliJ IDEA allows you to configure multiple execution profiles for applications, applets, JUnit tests, remote processes and WebLogic instances, making it easy to either run or to debug your software. You can quickly select a configuration to run or debug, directly from the main toolbar.

to the top

Sharing run configurations

Run configurations can be saved in project file, which allows sharing them among team members

to the top

Temporary run/debug configurations

screenshot

You can run any class or test, containing the main() method, directly from the Editor, or one of the project views. IntelliJ IDEA will automatically create a temporary run/debug configuration for the class, so that you can later save it as a permanent one, if necessary, or just use during the current IntelliJ IDEA session.

Temporary configurations are supplied with semi-transparent icons, for easier recognition.

to the top

Colored output in console

screenshot

IntelliJ IDEA allows you to visually distinguish data originating from different sources: output from a standard output stream is colored in black, from a standard error stream is colored in red, and user input is colored in green.

to the top

Fast and powerful debugger with HotSwap support

Debugger New UI

IntelliJ IDEA includes a JPDA-based debugger with a simple, easy to use user interface.

Code completion, intention actions, and syntax/error highlighting will ease speed up your work in different debugger dialogs. IntelliJ IDEA also supports the HotSwap feature that allows you to modify and recompile code during debugging, without need to restart.

to the top

Multiple types of breakpoints

In addition to the standard line breakpoints, IntelliJ IDEA suggests a set of features helping you in different aspects of the debugging process:

  • Exception breakpoints You can set up an action that will be executed whenever an exception of the specified type is thrown. There's a possibility to react on caught or uncaught exceptions only or both.
  • Field modification/access watchpoints You can track access or modifications of an arbitrary chosen field. By using instance filters, you can watch the access and modification events only on the fields of a certain class instances
  • Method entry/exit breakpoints This type allows you to track method entry and exit events

For each breakpoint type, you can define filters (Instance filters, Class filters and Pass count conditions) as well as specify the following properties:

  • Conditions You can specify a boolean expression for a breakpoint. The debugger will pause on the breakpoint only if the condition is evaluated to 'true'
  • Dependencies

The breakpoint can depend on another one, which means that it won't be hit until the specified breakpoint is hit.

to the top

Custom object display in debugger

screenshot

IntelliJ IDEA allows you to specify how different objects are displayed in the debugger, by class basis. You can assign expressions to display, instead of just standard String representation. You may, for example, want to display the User object only by login or full name. This saves your time incredibly when you need to analyze complex debugger output. The so-called Type Renderers can be customized through the Debugger dialog of the IDE Settings.

to the top

Navigation to source from exception stack traces

screenshot

When you run or debug your program in IntelliJ IDEA and some exception trace is printed to the console, you may easily navigate from the console directly to the source code with one click. Also you can quickly output the full thread dump right in the console.

If you get an external stack trace (from QA engineer or bug tracker), just copy it to the IntelliJ IDEA's Stack Trace Analyzer, and the stack trace will appear in the console with the navigation to source available. Read more about analysis of external stack traces.

to the top

Step Over, Step Into, Step Out, Force Step Into, Run to Cursor, Pop Frame

screenshot

Stepping commands allow you to precisely control the program execution by allowing you to step over to the next line of code, jump into the current method about to be called and to step out of the current method.

The step filters allow you to specify classes, packages, or class patterns that you do not wish to step into. This is useful if you are only interested in tracing through your own code and want to avoid stepping into outside libraries. Nevertheless, if during debugging you come across such classes, and you feel the need to step into them, IntelliJ IDEA provides you with the Force Step Into action, so that you can override the exclusion rule for a particular case.

The Pop Frame command pops the last debugger frame from the stack and restarts from the preceding execution point

to the top

Remote debugging

IntelliJ IDEA's debugger is capable of attaching itself to a running process using either socket or shared memory transport. This makes it possible to debug server-side programs (such as servlets) that are executed in the context of an application server. IntelliJ IDEA integrates with multiple application servers and provides general support for JSR45 servers for JSP debugging.

Read more about integration with application servers.

to the top

Expressions evaluations

You can create a list of watches, where each of expressions will be evaluated whenever the debugger is paused. You can also evaluate a single arbitrary expression in the context of a selected execution point, and the expression may contain method calls (Alt + F8).
All expressions are evaluated in the context which you are debugging.

to the top

Variable modification

Allows you to replace the value of a selected variable with the value of an arbitrary evaluated expression.

to the top

Tooltips with variable values right in the editor

Whenever a mouse pointer is over a local variable or a field in the editor a tooltip with the item's value will be shown.

to the top

Ability to export threads state to a text file

Whenever the debugger is paused, there is a possibility to save the information about the threads currently running in a text file or the clipboard.

to the top

Configurable set of types to show as toString() by default

Using this feature, you can configure the way an object instance is rendered by the debugger. You may need to view all objects with redefined toString() method as toString(), or specify object patterns.

to the top

Alternative view for Collection classes

Convenient way to explore standard java collections (Lists, Sets, Maps) when they are presented in an array-like view. You are also provided with an option to limit the number of shown elements.

to the top

Ability to copy node text to the clipboard

Ability to invoke toString() on an object and copy the resulted string to clipboard.

to the top

Suspending thread

Using the suspending thread feature, you can explicitly suspend and resume a particular thread.

to the top