mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 11:08:51 +01:00
Make breakpoint data available in EH immediately, not after a call to debug API (#186796)
Fix #169699
This commit is contained in:
@@ -6,12 +6,22 @@
|
||||
import * as assert from 'assert';
|
||||
import { basename } from 'path';
|
||||
import { commands, debug, Disposable, window, workspace } from 'vscode';
|
||||
import { assertNoRpc, disposeAll } from '../utils';
|
||||
import { assertNoRpc, createRandomFile, disposeAll } from '../utils';
|
||||
|
||||
suite('vscode API - debug', function () {
|
||||
|
||||
teardown(assertNoRpc);
|
||||
|
||||
test('breakpoints are available before accessing debug extension API', async () => {
|
||||
const file = await createRandomFile(undefined, undefined, '.js');
|
||||
const doc = await workspace.openTextDocument(file);
|
||||
await window.showTextDocument(doc);
|
||||
await commands.executeCommand('editor.debug.action.toggleBreakpoint');
|
||||
|
||||
assert.strictEqual(debug.breakpoints.length, 1);
|
||||
await commands.executeCommand('editor.debug.action.toggleBreakpoint');
|
||||
});
|
||||
|
||||
test('breakpoints', async function () {
|
||||
assert.strictEqual(debug.breakpoints.length, 0);
|
||||
let onDidChangeBreakpointsCounter = 0;
|
||||
|
||||
Reference in New Issue
Block a user