1

我有相同的配置来为 Deno 运行调试,它在 Pop OS 上运行良好,直到它崩溃并且我再次安装了 Ubuntu 20.04。

这是我的launch.json

{
  "configurations": [
  {
    "type": "pwa-node",
    "request": "launch",
    "name": "Launch Deno",
    "program": "${workspaceFolder}/index.ts",
    "cwd": "${workspaceFolder}",
    "runtimeExecutable": "/home/transonhoang/.deno/bin/deno",
    "runtimeArgs": [
      "run",
      "--inspect-brk=127.0.0.1:9229",
      "--allow-all",
      "--unstable"
    ],
    "attachSimplePort": 9229
  }
  ]
}

当我运行调试时,屏幕将显示如下图所示的弹出窗口:

在此处输入图像描述

我真的需要这方面的帮助。谢谢你的时间。

4

1 回答 1

0

这是我弄清楚后的解决方案。

  1. 更改launch.json
{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Deno",
      "type": "pwa-node",
      "request": "launch",
      "cwd": "${workspaceFolder}",
      "runtimeExecutable": "deno",
      "runtimeArgs": [
        "run",
        "-A",
        "--inspect-brk",
        "--unstable",
        "index.ts"
      ],
      "attachSimplePort": 9229,
      "outputCapture": "std"
    }
  ]
}

  1. 将我的 Deno 版本迁移到 1.7
于 2021-02-09T09:52:55.827 回答