You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

21 lines
738 B

'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;');