Node 中如何调试内置模块代码

304 阅读1分钟

node中的代码调试1.png

node中的代码调试2.png launch.json

node中的代码调试3.png

launch.json


{

  // 使用 IntelliSense 了解相关属性。

  // 悬停以查看现有属性的描述。

  // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387

  "version": "0.2.0",

  "configurations": [

    {

      "type": "pwa-node",

      "request": "launch",

      "name": "Launch Program",

      "skipFiles": [

        "<node_internals>/**" //把这个删除可以看node内置模块代码

      ],

      "program": "${file}"

    }

  ]

}