Firefox 如何捕获ConsoleExport Firebug扩展发送的XML数据包?

Firefox 如何捕获ConsoleExport Firebug扩展发送的XML数据包?,firefox,firebug,logging,Firefox,Firebug,Logging,我已经安装了Firebug扩展。通过将extensions.firebug.consoleexport.active设置为true,我在about:config启用了自动导出功能。例如,我打开了一个带有JavaScript错误的页面。我已启用Firebug,重新加载页面。我可以在日志中看到错误: uncaught exception: Error: Permission denied for <https://www.facebook.com> to get property Pro

我已经安装了Firebug扩展。通过将
extensions.firebug.consoleexport.active
设置为
true
,我在
about:config
启用了自动导出功能。例如,我打开了一个带有JavaScript错误的页面。我已启用Firebug,重新加载页面。我可以在日志中看到错误:

uncaught exception: Error: Permission denied for <https://www.facebook.com> to get property Proxy.InstallTrigger
未捕获异常:错误:获取属性Proxy.InstallTrigger的权限被拒绝
页面上写着:

您还可以激活正在发送的自动导出功能 单独以XML数据包的形式登录到指定的服务器

我知道我应该将
extensions.firebug.consoleexport.serverURL
设置为服务器URL。我不知道如何捕获ConsoleExport发送的XML数据包

例如,我知道如何在Mac上设置Apache,但接下来呢?如何捕获XML数据包

环境:

  • Mac OS X 10.7.2
  • 火狐8.0.1
  • 萤火虫1.8.4
  • 控制台导出0.5b4

如果捕获XML数据包的服务器更容易设置,我可以访问Windows和Linux机器。

听起来它只是通过AJAX请求将XML数据发送到该URL。 所以您需要定义一个脚本来处理XML数据

例如,使用PHP时,可以将
serverURL
首选项设置为
http://localhost/handleFBConsoleOutput.php
。然后,该脚本可以如下所示:


此处显示的代码写入所有POST参数的转储。您可能希望通过将
$$content
变量替换为
$\u POST['param_name']
,其中
param_name
是保存XML内容的参数的名称,并删除
ob_start();,来指定确切的参数作为输出。。。ob_clean()

作为参考:
在修改后的脚本中询问了相同的问题,修复了获取发布数据的问题:

请注意,发布数据的内容类型是application/xml

<?php
  $filename = 'consoleexport.log';

  if (!$handle = fopen($filename, 'a'))
  {
    echo 'File "'.$filename.'" could not be opened';
    exit;
  }

  ob_start();
  $content = file_get_contents('php://input');
  $content .= "\n";
  ob_clean();

  if (!fwrite($handle, $content))
  {
    echo 'Can\'t write into file "'.$filename.'"';
    exit;
  }

  echo 'Done!';
  fclose($handle);
?>


Honza

谢谢你的努力,但看起来有一两句话是错的