March 12th, 2008

JScript IntelliSense: Working with Ext JS

Ext is great framework for adding rich AJAX interactivity to your web application.  Unfortunately, JScript IntelliSense currently has difficulties processing the script and it’s not uncommon to see this message:

Ext

I just wanted to let everyone know that we’ve investigated and fixed the issue.  This fix will be available in the next service pack (no date announced yet).  In the meanwhile, there’s actually a simple workaround.  In a file that runs before ext-base.js, or on the first-line of ext-base.js itself, add the following code:

window.addEventListener = false;

This corrects for an inaccuracy in our simulated execution environment.  Once again, after the next service pack, this workaround will no longer be neccesary.  I quickly experimented with Ext 2.0.2…

ext20

…and Ext 1.1.1…

ext11

Ext is one of the larger libraries out there and thus it takes longer to execute.  If you’ve been seeing…

Timeout

…increasing the timeout will often solve the problem.

Increasing the Timeout

By default, every IntelliSense request is only allowed 15s to execute.  This is to prevent IntelliSense from scripts with infinite loops.  If you have a large script or slower machine, it may make sense to increase the timeout limit.  The timeout value store within following registry keys (depending on if your are using Express or the full product).  The value is in milliseconds so choose something greater than 15000.

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\HTML Editor\JsFailsafeTimeout 
HKEY_CURRENT_USER\Software\Microsoft\VWDExpress\9.0\HTML Editor\JsFailsafeTimeout

On a related note, we’ve read all the requests for Prototype support.  Like Ext, We’ve fixed the issue for the next service pack. But unlike Ext, there isn’t a temporary workaround to be offered.  We hope this info unblocks your work.  Thanks for using our editor!

Jeff King
Program Manager
Visual Studio Web Tools

0 comments

Discussion are closed.