如何打开和读取 VSCode 的调试器跟踪文件(“错误:找不到所提供的 eventData 的导入器。”)

问题描述 投票:0回答:1

我有以下

launch.json
用于调试网络应用程序:

  "configurations": [
    {
      "type": "chrome",
      "request": "launch",
      "name": "Launch Chrome",
      "url": "http://localhost:8000/build/",
      "webRoot": "${workspaceFolder}",
      "trace": true
    }

当我设置

"trace": true
时,VSCode 调试器会生成一个跟踪文件,该文件存储在我的 Mac 上的
Library/Application Support/Code/logs/.../window1/exthost/ms-vscode.js-debug/vscode-debugadapter-*.json.gz
中。

首先,解压它很困难,因为任何 util 都会抛出某些版本的

unexpected end of file
错误:

$ cat vscode-debugadapter-cfcd5cf7.json.gz| gzip -d > log.json
gzip: (stdin): unexpected end of file

其次,我尝试使用

chrome://tracing
“加载”它,但出现以下错误:

如何打开该文件?人们通常如何阅读它(因为几乎不可能直接阅读它)。我无法获得任何有关它的正式信息。

visual-studio-code debugging trace vscode-debugger
1个回答
-2
投票

要分析 VS Code JavaScript 调试器的跟踪输出,您可以使用 微软提供的工具(https://github.com/microsoft/vscode-pwa-analyzer

该工具在此网站上提供:

https://microsoft.github.io/vscode-pwa-analyzer/index.html

© www.soinside.com 2019 - 2024. All rights reserved.