I am working on Ehcache Monitor right now, which uses Ext JS. IntelliJ gives you the ability to debug both Java and JavaScript, which is really nice.

Local Debugging

To debug in IntelliJ you right click on a .html file and select Debug.

Remote Debugging

Set up a JavaScript Debug Remote configuration. See below for an example.

Make sure Firefox is closed and any previous debug session is closed.

Then Debug the Javascript Debug Remote config.

Getting it to Work

We had a bit of pain getting this working.

Mac OS X Version

10.6.2

IntelliJ Versions

I tested 9.0, 9.0.1 but couldn’t get it to work. It is known to work with Maia IU.92.273 which will become 9.0.2. It will install a FireFox plugin called JetBrains Firefox Extension. The version should be 0.2.5. 9 and 9.1 shipped with a 0.1 version of this plugin.

I am using Java 1.6_17.

Firefox Bug

Firefox gives an error mentiowith sqlite3 when using the HTML and JavaScript debugger.

This is caused by a bug in Firefox 3.5.7 and a few versions back. This problem has been reported on SnowLeopard.

Dyld Error Message:
Library not loaded: /usr/lib/libsqlite3.dylib
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
Reason: Incompatible library version: Security requires version 9.0.0 or later, but libsqlite3.dylib provides version 1.0.0

Dyld Error Message:  Library not loaded: /usr/lib/libsqlite3.dylib  Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security  Reason: Incompatible library version: Security requires version 9.0.0 or later, but libsqlite3.dylib provides version 1.0.0

This is a known issue in Firefox. See https://bugzilla.mozilla.org/show_bug.cgi?id=513747

The workaround is to change the Browser config to use firefox-bin rather than firefox. See below.