当前位置:网站首页>Vscade debug TS

Vscade debug TS

2022-06-12 08:17:00 Accpdaiyekun

First : Create a new debug file

testdebugger01.ts

Modify the configuration file

{
    //  Use  IntelliSense  Learn about properties . 
    //  Hover to see the description of an existing property .
    //  For more information , Please visit : https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [

       
        {
            "name": " debugging ts Code ",
            "type": "node",
            "request": "launch",
            "args": [
                "${workspaceFolder}/src/testdebugger01.ts"
            ],
            "runtimeArgs": [
                "-r",
                "ts-node/register"
            ],
            
        }
    ]
}

3、 ... and 、 stay vscode Open the terminal and install in the root directory ypescript And ts-node

npm install -i typescript ts-node

Four 、 Break point for debugging

原网站

版权声明
本文为[Accpdaiyekun]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/163/202206120808164888.html