2021-07-28 20:56:11 -07:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const common = require('../common');
|
|
|
|
|
|
|
|
common.skipIfInspectorDisabled();
|
|
|
|
|
|
|
|
const fixtures = require('../common/fixtures');
|
|
|
|
const startCLI = require('../common/debugger');
|
|
|
|
|
|
|
|
// Test for "Breakpoint at specified location already exists" error.
|
2022-09-27 22:22:39 +05:30
|
|
|
const script = fixtures.path('debugger', 'three-lines.js');
|
2023-03-28 00:03:40 +02:00
|
|
|
const cli = startCLI(['--port=0', script]);
|
2021-07-28 20:56:11 -07:00
|
|
|
|
2022-09-27 22:22:39 +05:30
|
|
|
(async () => {
|
|
|
|
try {
|
|
|
|
await cli.waitForInitialBreak();
|
|
|
|
await cli.waitForPrompt();
|
|
|
|
await cli.command('setBreakpoint(1)');
|
|
|
|
await cli.command('setBreakpoint(1)');
|
|
|
|
await cli.waitFor(/Breakpoint at specified location already exists/);
|
|
|
|
} finally {
|
|
|
|
await cli.quit();
|
2021-07-28 20:56:11 -07:00
|
|
|
}
|
2022-09-27 22:22:39 +05:30
|
|
|
})().then(common.mustCall());
|