Visual Studio Code 斷點調試Nodejs程序跳過node內部模塊(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.

 

 

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

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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM