Display errors in log

Why Komodo doesn’t do that?
E.g.
I type var rand = floor(Math.random()*100); - it’s not right (floor is not defined, must use Math.floor) and I want to see “floor in not defined” in log. Any method to do this?
Also I know about extension for developers, but anyway I want to know why Komodo do not “catch” errors from xpi’s :slight_smile:

It does, they should be in pystderr.log, however Mozilla is for some reason unbeknownst to me unable to capture errors in events (@Mook could probably tell you more about that). I work around this issue by adding a try/catch around my events during development.

They should…
[2014-07-25 01:18:08,887] [WARNING] koSkin: Detected GTK theme via libgtk: Numix Frost Light [2014-07-25 01:18:11,326] [DEBUG] places_js: waiting for document complete [2014-07-25 01:18:14,356] [WARNING] RefactoringLanguageServiceBase: Can't find a refactoring service for XML [2014-07-25 01:18:14,357] [WARNING] koLanguage: Asked for unknown language: 'None' [2014-07-25 01:18:15,601] [WARNING] root: ko.findresults was already loaded, re-creating it.
Nothing about “floor is not defined” :smile: I’ll be use try…catch.

There is any method to put something to Log?

Yeah, it was a longstanding bug. It looks like bug 50324 was fixed recently, so maybe that will help? Now we just need @toddw to generate a new nightly with a new enough Mozilla…

edit: fixed link

Your link is broken, @mook. . Out of date, link was fixed.

That was targeted for Moz27 and fixed in 2013, so Moz31 (which Komodo 9 uses) should have that fix. I don’t think it’s worth backporting it into Komodo 8.5.x, it’s annoying but hardly a major bug.

Note that most syntax checkers don’t warn about undefined top-level variables - as it’s very hard to know what will be defined in the environment you are running in. Even linters like JSLint or JSHint don’t do this type of checking.

For runtime warnings (given by Firefox and Komodo), you should be able to use the JS error console or Komodo error log.

1 Like