代码之家  ›  专栏  ›  技术社区  ›  nrofis

在VS代码中调试React TypeScript

  •  1
  • nrofis  · 技术社区  · 5 年前


    enter image description here

    经过一步,它到达:
    enter image description here

    launch.json

    "configurations": [
        {
            "name": ".NET Core Launch (web)",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            // If you have changed target frameworks, make sure to update the program path.
            "program": "${workspaceFolder}/WebApplication1/bin/Debug/netcoreapp2.1/WebApplication1.dll",
            "args": [],
            "cwd": "${workspaceFolder}/WebApplication1",
            "stopAtEntry": false,
            "launchBrowser": {
                "enabled": false
            },
            "sourceFileMap": {
                "/Views": "${workspaceFolder}/Views",
            }
        },
        {
            "name": "Chrome",
            "type": "chrome",
            "request": "launch",
            "url": "https://localhost:5001",
            "webRoot": "${workspaceFolder}/WebApplication1/ClientApp/src",
            "userDataDir": "${workspaceFolder}/.vscode/chrome",
            "sourceMapPathOverrides": {
                "webpack:///./src/*": "${webRoot}/*",
            }
        }
    

    顺便说一句,同样的行为也发生在visualstudio2019中。

    0 回复  |  直到 4 年前
        1
  •  0
  •   Fook    4 年前

    添加 "smartStep": true 给你的启动.json配置。

    https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_smart-stepping