• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2const common = require('../common');
3common.skipIfInspectorDisabled();
4const { NodeInstance } = require('../common/inspector-helper.js');
5
6async function runTests() {
7  const script = 'setInterval(() => {debugger;}, 60000);';
8  const node = new NodeInstance('--inspect=0', script);
9  // 1 second wait to make sure the inferior began running the script
10  await new Promise((resolve) => setTimeout(() => resolve(), 1000));
11  const session = await node.connectInspectorSession();
12  await session.send([
13    { 'method': 'Debugger.enable' },
14    { 'method': 'Debugger.pause' },
15  ]);
16  session.disconnect();
17  node.kill();
18}
19
20runTests().then(common.mustCall());
21