Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
除了检查process.execArgv和操作字符串之外,是否有更简单的方法来确定 Node 进程是否正在侦听调试连接,如果是,在哪种模式下以及在哪个端口上?process在API 页面上看不到任何内容。
process.execArgv
process
process有一个debugPort属性:
debugPort
if (typeof v8debug !== 'undefined') { console.log('In debug mode and listening on port: ' + process.debugPort); }