Debugging Ext JS in IntelliJ 9.0.2 (Maia IU.92.273)

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.


By Greg Luck

As Terracotta’s CTO, Greg (@gregrluck) is entrusted with understanding market and technology forces and the business drivers that impact Terracotta’s product innovation and customer success. He helps shape company and technology strategy and designs many of the features in Terracotta’s products. Greg came to Terracotta on the acquisition of the popular caching project Ehcache which he founded in 2003. Prior to joining Terracotta, Greg served as Chief Architect at Australian online travel giant Wotif.com. He also served as a lead consultant for ThoughtWorks on accounts in the United States and Australia, was CIO at Virgin Blue, Tempo Services, Stamford Hotels and Resorts and Australian Resorts and spent seven years as a Chartered Accountant in KPMG’s small business and insolvency divisions. He is a regular speaker at conferences and contributor of articles to the technical press.