This is specific to Internet Explorer. For certain reasons, I'm unable to use console.log
. I'm looking for a simple ActiveX object, safe for scripting, that would allow me to log debug output from JavaScript for viewing with the excellent DbgView tool. The object should use OutputDebugString for that.
Then I could simply use it like this:
<script>
function debugLog(str)
{
if (window.debugLogAx === undefined) {
try { window.debugLogAx = new ActiveXObject("IEDebugTools.Logger"); }
catch(e) { window.debugLogAx = null; }
}
if (window.debugLogAx !== null)
window.debugLogAx.OutputDebugString(str);
}
debugLog("Hello to DbgView from JavaScript!");
</script>
Does such thing exist?