mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
f01fd2ae70
Currently Inspector posts a V8 "task" when a message is incoming. To make sure messages are processed even when no JS is executed (e.g. while waiting for I/O or timer), inspector will now post a libuv request. Fixes: https://github.com/nodejs/node/issues/11589 PR-URL: https://github.com/nodejs/node/pull/11617 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
21 lines
577 B
JavaScript
21 lines
577 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const helper = require('./inspector-helper.js');
|
|
|
|
function shouldShutDown(session) {
|
|
session
|
|
.sendInspectorCommands([
|
|
{ 'method': 'Debugger.enable' },
|
|
{ 'method': 'Debugger.pause' },
|
|
])
|
|
.disconnect(true);
|
|
}
|
|
|
|
function runTests(harness) {
|
|
// 1 second wait to make sure the inferior began running the script
|
|
setTimeout(() => harness.runFrontendSession([shouldShutDown]).kill(), 1000);
|
|
}
|
|
|
|
const script = 'setInterval(() => {debugger;}, 60000);';
|
|
helper.startNodeForInspectorTest(runTests, '--inspect', script);
|