I am working on a komodo extension (a fork of kjslint), and hoping to release it soon. However, I am facing some difficulties to debug the extension: if there is any syntax errors in the js file, the extension just silently fails, no error is printed to anywhere (I tired error console, and pass -v to komodo binary to get more output). In addition, if there is a run time error, I could not find any messages printed anywhere.
what do I need to do to see the syntax errors/runtime errors in my extension?
thanks
Simplest solution I found until now is:
...
} catch (err) {
DafizillaCommon.exception(err);
}
Take a look at
https://dafizilla.svn.sourceforge.net/svnroot/dafizilla/trunk/komodo/
thanks for the info. I am using something like alert(JSON.encode(err)) in the catch block, the problem is I have to add try/catch almost everywhere in my code (for each event handler)
I was hoping there is a better way of doing this...
So you pretty much do need to wrap your full JS files in try/catch
blocks, at least during development.
If you're looking for a JS debugger, there's a variant of venkman
that works with Komodo at
http://community.activestate.com/xpi/venkman-javascript-debugger
- Eric
Venkman somehow does not work for me.
Any pointers how it should work?
... which is why we used to have our own JavaScript debugger,
for debugging Firefox web pages. Have you used it before with
Firefox? There is a bit of a learning curve getting up to speed
with it.
- Eric
It was working in some earlier KO, but in 6.* if I put "debugger" into the code it does not stop...
Although I've had no problem using venkman/komodo on all
three platforms.
- Eric
set javascript.options.showInConsole = true
more details: http://www.liucougar.net/blog/archives/262