4

I am working on a relatively complex JavaScript-driven website. It runs great in all browsers except Internet Explorer (7, this particular version is our corporate standard). I am getting this very curious error:

"A Runtime Error has occurred. Do you wish to Debug? Line: 93,865,600. Error: Expected ';'"

The issue is, I don't have 93 million lines of code, and clicking "Yes" doesn't attach to Visual Studio like it normally does.

I can click on 'No' and the website continues to run fine, but if a user doesn't have JavaScript debugging disabled, I don't want them to see this meaningless error.

Suggestions/Tools/Plugins to get to the bottom of this?

And yeah, I learned my lesson, switch over and check my project in Internet Explorer more often...

Thanks,

7
  • Are you using a minified framework? Commented Apr 19, 2010 at 20:07
  • I would go ahead and get the code up to 94 million lines to catch up with IE7. Commented Apr 19, 2010 at 20:27
  • We haven't minified anything yet. Commented Apr 19, 2010 at 20:33
  • So it runs fine in IE6 and IE8? What about IE8 in compatibility mode? Commented Apr 19, 2010 at 20:45
  • It hasn't been tested on IE6 and 8 Commented Apr 19, 2010 at 20:53

4 Answers 4

2

It's not strictly a debugging tool, but I wouldn't be surprised if Ajax DynaTrace helped you track down the weirdness.

http://ajax.dynatrace.com/pages/learn/solution-tour/ajax-performance-diagnostics.aspx

Also, run your code through JSLint. The error message makes it sound like you have a subtle syntax error that some browsers tolerate.

Sign up to request clarification or add additional context in comments.

2 Comments

Dynatrace helped me track it down to some JQuery code after a JSON-P call: head.insertBefore(script, head.firstChild); I understand this is a very fragile call in IE7 if any of the HTML is invalid... This is a great start, thanks for your help!
Glad to hear you're making progress.
1

Here are a couple of debugging tools I use on IE.

AND within IE, get it to scream about every other error that it encounters under Options. Here are the instructions to do so, you can also read the very useful debugging tips in the presented in the slideshow.

This will give a better picture where the error is occurring. If that doesn't work, you might want to try breaking down your scripts by not including parts of it, to see which parts or which particular JS script file is giving you problems.

1 Comment

I actually saw that page before I posted this, and made sure those checkboxes are unchecked as well as tried MS Script Debugger, with no luck. IE Developer Toolbar doesn't seem to give me any useful tools to track this down, and Firebug Lite has the odd side effect of suppressing the error...
0

This is still my best Javascript debugger on IE so far: Microsoft Web Developer Express

still much better than Developer Toolbar in IE8.

Totti

Comments

-1

I would also use Fiddler2 to view the exact files that are being given to the browser. There may be code on the server that adjusts the files before they are sent. Using Fiddler, you can see what the browser is receiving.

Also make sure you are using IE8, as the Developer Toolbar is built in to it. If not IE8, download the IE Developer Toolbar, as 'bron' said.

2 Comments

When using IE8, be sure to turn on script debugging. You can then debug directly inside IE, without attaching to Visual Studio.
Unfortunately I'm on IE7, because that is what the application users will have. There is no mechanism that would cause different scripts to be delivered because of the current browser.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.