devtools-backend
devtools-backend copied to clipboard
Runtime.overwriteConsole problem
Hi @christian-bromann
First of all, thanks for your amazing project (and thesis). I'm experiencing some problems on using your devtools-backend: running on my HbbTV the line
window.console = domains.Runtime.overwriteConsole.call(this, window.console)
cause a wrong overwrite of console object into the javascript environment. More in depth, every time I use a console.log
it throws an exception (it seems that the overwrite is not done properly).
Can you help me in some way?
P.S.: debugging the application through a screen log, the console
object without importing your script in the <head>
(to prevent the overwrite) contains a single object memory
, that is an empty object. I'm not seeing the log, debug, error, ... methods. Very weird...
Thanks for your help!
it throws an exception
What exception is thrown?
@christian-bromann a custom exception I throw in a simple try-catch block, like this:
<script>
try {
console.log('hi there');
} catch (e) {
var p = document.getElementById('content');
p.innerHTML = "ops...";
}
</script>
It seems that console.log
is not a function anymore!
Thanks again.