vscode debug typescript文件

  • tsconfig.json
js 复制代码
{
    "compilerOptions": {
        "target": "es2015",
        "module": "commonjs",
        "outDir": "out",
        "sourceMap": true,
    },
    "include": [
        "src/**/*"
    ]
}
  • tasks.json
js 复制代码
{
	"version": "2.0.0",
	"tasks": [
		{
			"type": "typescript",
			"tsconfig": "tsconfig.json",
			"problemMatcher": [
				"$tsc"
			],
			"group": "build",
			"label": "tsc: build - tsconfig.json"
		}
	]
}
  • launch.json
js 复制代码
{
    // 使用 IntelliSense 了解相关属性。 
    // 悬停以查看现有属性的描述。
    // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "启动程序",
            "skipFiles": [
                "<node_internals>/**"
            ],
            "program": "${workspaceFolder}\\src\\index.ts",
            "preLaunchTask": "tsc: build - tsconfig.json",
            "outFiles": [
                "${workspaceFolder}/out/**/*.js"
            ]
        }
    ]
}

【参考】

https://blog.csdn.net/2301_79959413/article/details/133770872

相关推荐
嵌入式小能手4 小时前
开发环境搭建之VScode的安装及使用
vscode·编辑器
读心悦4 小时前
TS 中类型的继承
typescript
读心悦5 小时前
在 TS 的 class 中,如何防止外部实例化
typescript
N1cez6 小时前
vscode 连接服务器 不用输密码 免密登录
服务器·vscode
yufei-coder7 小时前
C# Windows 窗体开发基础
vscode·microsoft·c#·visual studio
white.tie11 小时前
vscode配置golang
ide·vscode·golang
mashagua13 小时前
本地访问autodl的jupyter notebook
ide·python·jupyter·autodl
DaphneOdera1713 小时前
Jupyter | jupyter notebook 使用 conda 环境
ide·jupyter·conda
一只积极向上的小咸鱼13 小时前
jupyter本地配置
ide·python·jupyter
4v1d13 小时前
Jupyter的使用分享
ide·python·jupyter