http://code.visualstudio.com/docs/editor/debugging#_launch-configurations
VSCode內置Node.js運行時, 能調試javascript, TypeScript.
如果要啟動調試, 需要設置啟動配置文件--launch.json. 單擊調試視圖頂部的配置齒輪圖標
選擇調試環境, vscode將在.vscode目錄下生成一個launch.json的配置文件
launch.json中有很多屬性可以設置, 通過智能提示查看有那些屬性可以設置, 如果要查看屬性的具體含義, 可以把鼠標懸停在屬性上面, 會屬性的使用說明.
在launch.json中會使用到一些預定變量, 這些變量的具體含義如下
${workspaceRoot} the path of the folder opened in VS Code(VSCode中打開文件夾的路徑)
${workspaceRootFolderName} the name of the folder opened in VS Code without any solidus (/)(VSCode中打開文件夾的路徑, 但不包含"/")
${file} the current opened file(當前打開的文件)
${relativeFile} the current opened file relative to workspaceRoot(當前打開的文件,相對於workspaceRoot)
${fileBasename} the current opened file's basename(當前打開文件的文件名, 不含擴展名)
${fileDirname} the current opened file's dirname(當前打開文件的目錄名)
${fileExtname} the current opened file's extension(當前打開文件的擴展名)
${cwd} the task runner's current working directory on startup()