Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/371.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
ActiveX/COM对象正在从JavaScript输出用于IE的DebutDebugString_Javascript_Internet Explorer_Debugging_Activex - Fatal编程技术网

ActiveX/COM对象正在从JavaScript输出用于IE的DebutDebugString

ActiveX/COM对象正在从JavaScript输出用于IE的DebutDebugString,javascript,internet-explorer,debugging,activex,Javascript,Internet Explorer,Debugging,Activex,这是特定于Internet Explorer的。由于某些原因,我无法使用console.log。我正在寻找一个简单的ActiveX对象,可以安全地编写脚本,它允许我记录JavaScript的调试输出,以便使用优秀的脚本进行查看。该对象应用于此操作 然后我可以这样简单地使用它: <script> function debugLog(str) { if (window.debugLogAx === undefined) { try { window.debugLogAx =

这是特定于Internet Explorer的。由于某些原因,我无法使用
console.log
。我正在寻找一个简单的ActiveX对象,可以安全地编写脚本,它允许我记录JavaScript的调试输出,以便使用优秀的脚本进行查看。该对象应用于此操作

然后我可以这样简单地使用它:

<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>

函数调试日志(str)
{
if(window.debugLogAx==未定义){
请尝试{window.debugLogAx=newActiveXObject(“IEDebugTools.Logger”);}
catch(e){window.debugLogAx=null;}
}
if(window.debugLogAx!==null)
window.debugLogAx.OutputDebugString(str);
}
调试日志(“您好,来自JavaScript的DbgView!”);

这样的东西存在吗?

我不相信这样的ActiveX真的存在,但是创建这样的ActiveX很容易。Visual Studio、ATL、new object、add new method,仅此而已:)

是的,这很简单,但接下来我需要创建一个安装程序包,获取代码签名证书,并对其进行签名,然后才能将其交给客户端设备进行故障排除。我想这样的东西可能已经存在了,因为它听起来像是一个方便的工具。