mirror of
https://github.com/nodejs/node.git
synced 2025-05-09 23:06:47 +00:00

PR-URL: https://github.com/nodejs/node/pull/12622 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
16 lines
350 B
JavaScript
16 lines
350 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
common.skipIfInspectorDisabled();
|
|
const spawn = require('child_process').spawn;
|
|
|
|
const proc = spawn(process.execPath, ['inspect', 'foo']);
|
|
proc.stdout.setEncoding('utf8');
|
|
|
|
let output = '';
|
|
proc.stdout.on('data', (data) => {
|
|
output += data;
|
|
if (output.includes('debug> '))
|
|
proc.kill();
|
|
});
|