process.setSourceMapsEnabled(val)


稳定性: 1 - 实验

此函数启用或禁用对堆栈跟踪的 Source Map v3 的支持。

它提供与使用命令行选项 --enable-source-maps 启动 Node.js 进程相同的功能。

只有在启用源映射后加载的 JavaScript 文件中的源映射才会被解析和加载。

Stability: 1 - Experimental

This function enables or disables the Source Map v3 support for stack traces.

It provides same features as launching Node.js process with commandline options --enable-source-maps.

Only source maps in JavaScript files that are loaded after source maps has been enabled will be parsed and loaded.