views:

424

answers:

8

Hi there,

Does anyone know if a browser-independent debugger exists...

For example I have been using Firebug in Firefox but if the web developers use other browsers - nothing.

I was wondering if there is some kind of "global" debugger that can attach to any browser and just debug?

Any ideas?

+3  A: 

Nearly all the browsers have there own JavaScript debugger. Simply because they don't provide the same API (if they provide some) for accessing the JavaScript engine.

So, to complete your list, you have DragonFly for Opera, and WebInspector for the browsers based on WebKit (like Safari).

gizmo
Mild note Drosera is dead -- debugging is built into the WebInspector
olliej
Thanks, I'll update my answer!
gizmo
Is it "WebInspector" or "Web Inspector"? (On Apple's Safari 4 features page at http://www.apple.com/safari/features.html#developer, it is the latter.)
Steve Harrison
with the space -- apple wrote it so their name is correct (although Webkit vs. WebKit vs. Web Kit gets totally different responses depending on who you talk to :D )
olliej
+4  A: 

The makers of Firebug also make Firebug Lite, a JavaScript file that you can include in your webpage. They say that it works in IE, Opera, and Safari.

Steve

Steve Harrison
A: 

javascript depends on the browser you are using (thus compatibility problems). To debug explorer you may use this: Microsoft Script debugger

0plus1
+2  A: 

For IE you can also use Visual Studio to debug JavaScript - and it's better than the Microsoft Script Debugger. I'm not sure if the express editions are also capable of this.

Added: Both VS2005 and VS2008 are capable of JS debugging, although the newer product is better of course.

Vilx-
+1 for recommending Visual Studio (2008?). The JavaScript debugger is excellent.
Richard Ev
Excellent? Not really. Quite often it can't show me the code that threw an exception, or shows something really way off. But I suspect that to be a problem of Microsoft Scripting Engine, not VS.
Vilx-
VS 2003 also works decently.
alumb
MS needs to build something like Firebug into IE. It makes SO much more sense to debug in the same environment you're executing, and Firebug kicks serious butt.
Dave Swersky
+1  A: 

You can debug javascript with express edition of visual studio. Look here for details

Bharani
+2  A: 

Since each browser has its own engine with its own quirks and such, it's more or less impossible to have a universal debugger.

Aptana, which is really just a rebranded Eclipse for web projects, has a debugger built in to the IDE, and comes closes to that ideal--in theory. It uses the Eclipse platform's debugging interface, but it still needs to be plugged into a browser. In Firefox, this works by plugging into...Firebug's JS debugger. But, it allows you to set breakpoints and step through code directly from the IDE (quite helpful for external JS files). For IE debugging, you need to purchase the Pro version, so I can't vouch for its quality. AFAIK, it doesn't support other browsers.

The Danner
+1  A: 

Short answer: I don't believe so, but I hope you find one because I'd love to have one.

However, if you haven't been following IE development lately, IE's JScript debugging is alot less painful now with IE8; it includes, by default, some dev tools that do pretty much everything that Firebug does with the exception of AJAX debugging (but I prefer a protocol analyzer anyways for AJAX). It even implements an executable console, which includes several of the console.X methods from Firebug!

The profiler, I'm tempted to say, is nicer than Firebug's - simply because it lets you export the results directly to CSV. The actual debugger is as full-featured as JS debuggers get, with stepping/breakpoints/direct input.

Also, I haven't heard Venkman mentioned yet; its the grand-daddy of Firefox debugging (and other Mozilla Javascript). Not as popular as Firebug, but it definitely has its followers.

Lots of good information on this page as well: wikibooks.org/wiki/JavaScript/Debugging

ken
+1  A: 

I run a Webservice that allows developers to "debug" their Javascript in the sense of finding bugs via a Javascript validator. See the HTML5 IDE guide for details to set it up with the "global" vim editor.

hendry