2018-01-16 23:35:54 +01:00
|
|
|
// Flags: --expose-internals
|
2017-02-16 23:45:56 +01:00
|
|
|
'use strict';
|
2017-03-01 08:16:48 +01:00
|
|
|
const common = require('../common');
|
|
|
|
common.skipIfInspectorDisabled();
|
2017-10-14 04:42:38 +02:00
|
|
|
const { NodeInstance } = require('../common/inspector-helper.js');
|
2017-02-16 23:45:56 +01:00
|
|
|
|
2017-07-24 18:23:04 +02:00
|
|
|
async function runTests() {
|
|
|
|
const script = 'setInterval(() => {debugger;}, 60000);';
|
|
|
|
const node = new NodeInstance('--inspect=0', script);
|
2017-02-16 23:45:56 +01:00
|
|
|
// 1 second wait to make sure the inferior began running the script
|
2017-07-24 18:23:04 +02:00
|
|
|
await new Promise((resolve) => setTimeout(() => resolve(), 1000));
|
|
|
|
const session = await node.connectInspectorSession();
|
|
|
|
await session.send([
|
|
|
|
{ 'method': 'Debugger.enable' },
|
|
|
|
{ 'method': 'Debugger.pause' }
|
|
|
|
]);
|
|
|
|
session.disconnect();
|
|
|
|
node.kill();
|
2017-02-16 23:45:56 +01:00
|
|
|
}
|
|
|
|
|
2017-07-24 18:23:04 +02:00
|
|
|
runTests();
|