Posts Tagged ‘debugger’

Some Nice/New Features of ActionScript/Flex Debugger

Tuesday, December 13th, 2011

I’d like to highlight few useful features in ActionScript/Flex debugger, some of which are new in IntelliJ IDEA 11.

Better members presentation in Variables view (informative icons, sorting) with ability to jump to source:

Convenient collections view (size, Vector status, collection elements):

Mark any object instance and this instance will be highlighted in all views if met again until the end of the debug session:

[SWF] and [UnloadSWF] messages are now filtered out by default. Toggle respective button in Debug tool window to switch the filter off:

Debug with pleasure!

New in 11: ‘Mark Object’ action in JavaScript debuggers

Tuesday, November 8th, 2011

Since IntelliJ IDEA 11 the Mark Object action, which was previously available in JVM-based debuggers only, is also supported in JavaScript debuggers for Firefox and Chrome browsers. To mark an object press F11 on the corresponding node in any debugger tree and specify the label:

After that the labeled object will be marked accordingly in all debugger views:

By the way this feature also works in Flex debugger starting from IntelliJ IDEA 10.5.

New in 11: Custom objects presentation in JavaScript debugger

Friday, October 7th, 2011

When you debug JavaScript code in IntelliJ IDEA 11 you can see the most important properties of an object without expanding its node:

By default the ‘id’ and ‘name’ properties are shown for each object but you can add your own properties in Settings | Debugger | JavaScript:

This feature works for both Firefox and Chrome JS debuggers.

Let us know what you think!

Debugger: working with sub-ranges for arrays and lists

Friday, September 30th, 2011

During debugging IntelliJ IDEA shows only the first 100 elements of arrays and collections. It’s enough in most cases. However, it’s sometimes convenient to use a custom range. Exactly for this the ‘Adjust Range’ action has been available for arrays for quite a long time. But recently we’ve made a couple of improvements to it. Namely:

  • ‘Adjust Range’ works with lists now
  • adjusted range is preserved for local variables delivered to another stack frame

Quick demonstration example:

  1. Start debugger and wait until target break point is hit;
  2. Right click on target array/list and select the ‘Adjust Range…’ action:
  3. Define a range:
  4. Check the result:

New in 10.5: Attach debugger to a running Android process

Friday, May 6th, 2011

Recently, we’ve introduced a new feature that should make it MUCH easier to debug your Android applications. Now, you can attach IntelliJ IDEA debugger to any process running on an Android device or in the emulator, which is related to the source code of your project.

Just click “Attach debugger to Android process” toolbar button and you’ll see the list of processes grouped by device they are running on:

Note: to be shown in the list above the name of the process should be specified in AndroidManifest.xml as a “package” or “process” XML attribute.

The feature is, of course, available in the IntelliJ IDEA 10.5 Release Candidate. So, you are welcome to try and let us know what you think.

IntelliJ IDEA: Debugging JavaScript in Google Chrome

Monday, March 28th, 2011

IntelliJ IDEA 10 allows you to debug JavaScript code running it in Mozilla Firefox. In IntelliJ IDEA 10.5 can choose to debug JavaScript in Google Chrome as well.

Debugger for Chrome supports all features of JavaScript debugger for Firefox, you can set breakpoints, inspect local variables, evaluate expressions and so on:

If you use Chrome for web browsing and want to debug in it simultaneously you can configure IntelliJ IDEA to use a separate Chrome user profile in ‘IDE Settings | Browser | Chrome‘:

To configure the default debugging browser just edit the ‘JavaScript Debug’ configuration under ‘Defaults’ section.

Download IntelliJ IDEA 10.5 EAP, try the new JS debugger and let us know what you think.

Off-topic: debugging JS in FireFox 4 is supported since IntelliJ IDEA 10.0.3.

Referencing marked objects in expression evaluation

Friday, September 3rd, 2010

You already may be familiar with the Mark Object (F11) functionality available in IntelliJ IDEA’s debugger. The feature allows tagging an arbitrary object with a colored text label. After an object is assigned a label, it becomes visible everywhere the object is displayed (Watches, Variables View, Evaluation Window etc.).

In IntelliJ IDEA 10 the feature has been extended and now you can reference marked object in debugger’s expressions by the label.

In Evaluation dialog, Watches panel or breakpoint condition field a marked object can be referenced as if a local variable named <label-name>_DebugLabel was defined in the same context where the expression is evaluated. Such pseudo-variables are also suggested in completion popups. See examples below.


This extended functionality allows you to lookup a marked object even if it is not available from the current debugger’s context and adds extra expressiveness and flexibility to a user-defined breakpoint conditions and evaluated expressions.

The feature will be available in the next IntelliJ IDEA 10 EAP build. Stay tuned!

Improved Flex Debugger

Friday, May 7th, 2010

It’s not a secret that IntelliJ IDEA has a fully functional interactive debugger for Flex and AIR applications. Here’s a list of features added or improved in upcoming IntelliJ IDEA 9.0.3 release:

  • XML and XMLList runtime value view
  • Smart Step Into: select a function to step into if more than one available (Shift+F7) (more…)

JavaScript debugger improvements

Friday, April 16th, 2010

In the latest IDEA 9.0.2 EAP build the new ‘Scripts’ tab is available in JavaScript Debug tool window:

It displays all scripts loaded by Firefox in a tree-like structure and allows to open a script in the editor to set breakpoints in it.

If you want to debug JavaScript code in a JavaEE application you can set the corresponding option in an application server run configuration:

Make sure to check the new demos featuring:

There are more IntelliJ IDEA demos available at http://www.jetbrains.com/idea/training/demos.html

Develop with pleasure!
The JetBrains Team

Debugger Evaluate Expression Enhancements

Monday, September 14th, 2009

Say, you hit a breakpoint in Java code:

And you cleanly see that component is a label:

You now want to investigate label internals via Evaluate Expression (Alt+F8), e.g. invoke its getText() method, but component declared type is Component and it does not have this method! The only way out is to use Surround with run-time type (Ctrl+Alt+T) first to cast it to JLabel and only then completion becomes available:

Not anymore it isn’t. IntelliJ IDEA tries to help with casting wherever possible, so you can now get the same results using Basic code completion (Ctrl+Space) only:

…press Enter and the cast is done for you:

Needless to say, it works with Smart completion (Ctrl+Shift+Space), too. It works even for complex expressions with method calls. Note, that method evaluation can take a lot of time, not to mention the possible side effects, so evaluating expressions every time you hit completion is not so nice. This is why you need to press the same shortcut twice to get the run-time type variants. That’s what you’re going to see at the bottom of completion list:

And you can play with all this now!