mirror of
https://github.com/nodejs/node.git
synced 2025-04-30 23:56:58 +00:00

This change allows for easier recognition of builtin modules in stack traces. Refs: https://github.com/nodejs/node/issues/11893 PR-URL: https://github.com/nodejs/node/pull/35498 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
29 lines
1.0 KiB
JavaScript
29 lines
1.0 KiB
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
|
|
// Regression test for https://github.com/nodejs/node/issues/32648
|
|
|
|
common.skipIfInspectorDisabled();
|
|
|
|
const { NodeInstance } = require('../common/inspector-helper.js');
|
|
|
|
async function runTest() {
|
|
const child = new NodeInstance(['--inspect-brk-node=0', '-p', '42']);
|
|
const session = await child.connectInspectorSession();
|
|
await session.send({ method: 'Runtime.enable' });
|
|
await session.send({ method: 'Debugger.enable' });
|
|
await session.send({ method: 'Runtime.runIfWaitingForDebugger' });
|
|
await session.waitForNotification((notification) => {
|
|
// The main assertion here is that we do hit the loader script first.
|
|
return notification.method === 'Debugger.scriptParsed' &&
|
|
notification.params.url === 'node:internal/bootstrap/loaders';
|
|
});
|
|
|
|
await session.waitForNotification('Debugger.paused');
|
|
await session.send({ method: 'Debugger.resume' });
|
|
await session.waitForNotification('Debugger.paused');
|
|
await session.runToCompletion();
|
|
}
|
|
|
|
runTest().then(common.mustCall());
|