Open jlfwong opened 9 years ago
Note to fix the issue: we should probably "listen" messages sent to the gecko console API, so we can intercept asynchronous javascript error messages.
I don't know how to do it. I have tried to hide errors by enabling the debugger: https://developer.mozilla.org/en-US/docs/Archive/Mozilla/XULRunner/Debugging_XULRunner_applications#Browser_Debugger
but with no success. Errors are still not being catched by debugger, although the debugger is working and intercepting some other messages (normally invisible without the debugger) like:
Full message: TypeError: self._socket is null
Full stack: SocketListener.prototype.open/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/security/socket.js:414:7
I need to catch all JS errors, because my application is using timers very often.
i use websocket but i can not catch any error after open callback, only system.stderr can, but it includes some warn and a lot xmlhttprequest information. and phantom.onError can not catch any error which in some async function
and --debug=no or false was always trun on debug mode, document say that value is \<bool>?
version: Innophi SlimerJS 0.10.3, Copyright 2012-2017 Laurent Jouanneau & Innophi system: osx
Repro Script:
Expected behaviour:
Here's the actual behaviour with
phantomjs
:Actual behaviour:
slimerjs test.js
outputspre
, then hangs.