-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
inspector: send messages after the Node is done
Fixes: #14432 PR-URL: #14463 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
- Loading branch information
Showing
2 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
'use strict'; | ||
const common = require('../common'); | ||
common.skipIfInspectorDisabled(); | ||
const helper = require('./inspector-helper.js'); | ||
|
||
function test(session) { | ||
session.sendInspectorCommands([ | ||
{ 'method': 'Runtime.runIfWaitingForDebugger' }, | ||
{ 'method': 'Profiler.setSamplingInterval', 'params': { 'interval': 100 } }, | ||
{ 'method': 'Profiler.enable' }, | ||
{ 'method': 'Profiler.start' }]); | ||
session.expectStderrOutput('Waiting for the debugger to disconnect...'); | ||
session.sendInspectorCommands({ 'method': 'Profiler.stop' }); | ||
session.disconnect(true); | ||
} | ||
|
||
function runTests(harness) { | ||
harness.runFrontendSession([test]).expectShutDown(0); | ||
} | ||
|
||
helper.startNodeForInspectorTest(runTests, ['--inspect-brk'], 'let a = 2;'); |