How do I skip external code when debugging in VS Code

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"
]

I was confused on where to put the setting, so just in case, if you want to skip both node_modules deps and node_internals files, your .vscode/launch.json file should look something like this:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Debug Tests",
            "type": "node",
            "request": "launch",
            ...
            "skipFiles": ["<node_internals>/**", "${workspaceFolder}/node_modules/**/*.js"]
        }
    ]
}