ActiveX / COM object makes an OutputDebugString for use with IE with JavaScript

This applies to Internet Explorer. For certain reasons, I cannot use console.log . I am looking for a simple script-safe ActiveX object that will allow me to register JavaScript output for viewing with the excellent DbgView tool . For this, the object must use OutputDebugString .

Then I could just 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> 

Is there such a thing?

0
javascript debugging internet-explorer activex
source share
1 answer

I do not think that such ActiveX exists, but creating it is quite simple. Visual Studio, ATL, a new object, add a new method and that’s all :)

0
source share

All Articles