How do I skip external code when debugging in VS Code

后端 未结 2 448
野的像风
野的像风 2020-11-29 06:55

When debugging in vscode I\'d like to make some \"blackboxing\" and do not enter into code I didn\'t write. How can I do this?

相关标签:
2条回答
  • 2020-11-29 07:10

    this is my launch.json file (it works for me):

    {
        "version": "0.2.0",
        "configurations": [
            {
                "type": "edge",
                "request": "launch",
                "name": "Launch Edge against localhost",
                "url": "http://localhost:4200",
                "webRoot": "${workspaceFolder}",
                "skipFiles": [
                  "${workspaceFolder}/node_modules/**/*.js"
                ]
            }
        ]
    }
    
    0 讨论(0)
  • 2020-11-29 07:13

    In your launch or attach debug task you can enter a

    "skipfiles"

    option which is

    "An array of file or folder names, or path globs, to skip when debugging."

    For example, from skipping node internals during debugging

    "skipFiles": [
      "${workspaceFolder}/node_modules/**/*.js",
      "${workspaceFolder}/yourLibToSkip/**/*.js"
    ]
    

    Also, there is a "magic reference" to the built-in core node modules you can use:

    "skipFiles": [
      "<node_internals>/**/*.js"
    ]
    
    0 讨论(0)
提交回复
热议问题