【问题标题】:Chrome crashed when using visual studio code debug console使用 Visual Studio 代码调试控制台时 Chrome 崩溃
【发布时间】:2017-12-11 17:06:12
【问题描述】:

[描述]

我正在使用 visual studio 代码 + 用于 chrome 扩展的调试器 构建一个用于开发 chrome 扩展的 IDE。经过反复试验,我使用 Attach to chrome,使用 sourcemaps 调试模式成功运行了源 java-script。但是当我使用调试控制台时,chrome总是会立即崩溃...... 我该如何解决?

[症状]

调试器在断点处暂停,但当我使用调试控制台时,chrome 总是立即崩溃。

chrome 崩溃日志

[环境]

  • Ubuntu 17.10
  • Visual Studio 代码 1.18.1
  • Chrome 3.5.0 调试器
  • 谷歌浏览器 63.0.3239.84
  • launch.json

    {
        // Use IntelliSense to learn about possible Node.js debug attributes.
        // Hover to view descriptions of existing attributes.
        // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
        "version": "0.2.0",
        "configurations": [
            {
                "name": "Launch Chrome against localhost, with sourcemaps",
                "type": "chrome",
                "request": "launch",
                "url": "http://10.19.202.100:8080",
                "sourceMaps": true,
                "webRoot": "${workspaceRoot}"
            },
            {
                "name": "Attach to Chrome, with sourcemaps",
                "type": "chrome",
                "request": "attach",
                "port": 9222,
                "sourceMaps": true,
                "webRoot": "${workspaceRoot}/src"
            }
        ]
    }
    

【问题讨论】:

    标签: javascript google-chrome visual-studio-code


    【解决方案1】:

    [根本原因]

    • 例外:禁用 Natives
    • Chrome 稳定版无法启用原生客户端

    [解决方案]

    • 卸载 Chrome(稳定版)
    • 安装Chrome (dev channel)
    • 从控制台启动 Chrome

      google-chrome --remote-debugging-port=9222 --enable-nacl
      
    • 使用 附加到 chrome,使用 sourcemap 运行 VSCode 调试
    • 尽情享受吧!!

    [参考]

    【讨论】:

      猜你喜欢
      • 2021-08-14
      • 2011-10-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-11-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多