Visual Studio Code breakpoint debug NodeJS program Skip Node internal module (Internal Modules)

Built-in core modules of Node.js can be referred to by the’magic name’ in a glob pattern. The following example skips all internal modules:

“skipFiles”: [

/**/*.js”,

“${workspaceRoot}/node_modules/**/*. js”

]

The exact’skipping’ rules are as follows:

  • If you step into a skipped file, you won’t stop there-you will stop on the next executed line that is not in a skipped file.
  • If you have set the option to break on thrown exceptions, then you won’t break on exceptions thrown from skipped files.
  • If you set a breakpoint in a skipped file, you will stop at that breakpoint, and you will be able to step through it until you step out of it, at which point normal skipping behavior will resume.

Data 1: internal modules: https://github.com/nodejs/node/tree /master/lib

Document 2: https://vscode-doc-jp.github.io/docs/nodejs/nodejs- debugging.html#Skipping-uninteresting-code-node-chrome

“${workspaceRoot}/node_modules/**/*.js”

Leave a Comment

Your email address will not be published.