Visual Studio Code breakpoint debugging Nodejs to skip node inside the module (internal modules)

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

 

"skipFiles": [

   "<node_internals>/**/*.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

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

Guess you like

Origin www.cnblogs.com/eret9616/p/11583894.html