1. 安装拓展 TypeScript Debugger
    2024-06-12T05:54:46.png
  2. 创建tsconfig.json
    tsc --init
    如果报错,请尝试安装typescript 模块
    npm install typescript -g
  3. 创建launch.json
    2024-06-12T06:00:51.png
{
    // 使用 IntelliSense 了解相关属性。 
    // 悬停以查看现有属性的描述。
    // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "ts-node",
            "type": "node",
            "request": "launch",
            "args": [
                "${relativeFile}"
            ],
            "runtimeArgs": [
                "-r",
                "ts-node/register"
            ],
            "cwd": "${workspaceRoot}",
            "protocol": "inspector",
            "internalConsoleOptions": "openOnSessionStart"
        }
    ]
}
  1. 安装调试以来,注意只能本地安装,不要全局安装,不然路径无法识别

npm install typescript ts-node tsconfig-paths

  1. 设置断点,F5 调试
参考文档

标签: TypeScript

已有 13 条评论

  1. 看的我热血沸腾啊https://www.237fa.com/

  2. 不错不错,我喜欢看 https://www.237fa.com/

  3. 看的我热血沸腾啊https://www.ea55.com/

  4. 不错不错,我喜欢看 www.jiwenlaw.com

  5. 你的文章让我心情愉悦,真是太棒了! http://www.55baobei.com/j4ECOhBEsf.html

  6. 《风筝1958》剧情片高清在线免费观看:https://www.jgz518.com/xingkong/5615.html

  7. 你的文章充满了智慧,让人敬佩。 http://www.55baobei.com/gpj1or7Zhj.html

  8. 《弗里蒙特》剧情片高清在线免费观看:https://www.jgz518.com/xingkong/17395.html

  9. 你的文章让我心情愉悦,每天都要来看一看。 http://www.55baobei.com/thZlffIMzW.html

  10. 《家族游戏》日本剧高清在线免费观看:https://www.jgz518.com/xingkong/32495.html

  11. 你的文章让我感受到了不一样的风景,谢谢分享。 https://www.yonboz.com/video/47506.html

  12. 平淡中见真章,质朴处显功力。

  13. 文章紧扣主题,观点鲜明,展现出深刻的思考维度。

添加新评论