本文整理汇总了TypeScript中vscode-debugadapter-testsupport.DebugClient.configurationDoneRequest方法的典型用法代码示例。如果您正苦于以下问题:TypeScript DebugClient.configurationDoneRequest方法的具体用法?TypeScript DebugClient.configurationDoneRequest怎么用?TypeScript DebugClient.configurationDoneRequest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vscode-debugadapter-testsupport.DebugClient
的用法示例。
在下文中一共展示了DebugClient.configurationDoneRequest方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
}).then(response => {
const bp = response.body.breakpoints[0];
assert.equal(bp.verified, true, 'breakpoint verification mismatch: verified');
assert.equal(bp.line, COND_BREAKPOINT_LINE, 'breakpoint verification mismatch: line');
assert.equal(bp.column, COND_BREAKPOINT_COLUMN, 'breakpoint verification mismatch: column');
return dc.configurationDoneRequest();
}),
示例2: it
it('should support stopping on everything', async () => {
await client.setExceptionBreakpointsRequest({filters: ['*']});
// Notice
const [, {threadId}] = await Promise.all([
client.configurationDoneRequest(),
assertStoppedLocation('exception', program, 6)
]);
// Warning
await Promise.all([
client.continueRequest({threadId}),
assertStoppedLocation('exception', program, 9)
]);
// Exception
await Promise.all([
client.continueRequest({threadId}),
assertStoppedLocation('exception', program, 12)
]);
// Fatal error: uncaught exception
await Promise.all([
client.continueRequest({threadId}),
assertStoppedLocation('exception', program, 12)
]);
await Promise.all([
client.continueRequest({threadId}),
client.waitForEvent('terminated')
]);
});
示例3: it
it('should support removing a breakpoint', async () => {
await Promise.all([client.launch({program}), client.waitForEvent('initialized')]);
// set two breakpoints
let breakpoints = (await client.setBreakpointsRequest({breakpoints: [{line: 3}, {line: 5}], source: {path: program}})).body.breakpoints;
assert.lengthOf(breakpoints, 2);
assert.isTrue(breakpoints[0].verified, 'breakpoint verification mismatch: verified');
assert.equal(breakpoints[0].line, 3, 'breakpoint verification mismatch: line');
assert.isTrue(breakpoints[1].verified, 'breakpoint verification mismatch: verified');
assert.equal(breakpoints[1].line, 5, 'breakpoint verification mismatch: line');
// stop at first
const [{threadId}] = await Promise.all([
assertStoppedLocation('breakpoint', program, 3),
client.configurationDoneRequest()
]);
// remove second
breakpoints = (await client.setBreakpointsRequest({breakpoints: [{line: 3}], source: {path: program}})).body.breakpoints;
assert.lengthOf(breakpoints, 1);
assert.isTrue(breakpoints[0].verified, 'breakpoint verification mismatch: verified');
assert.equal(breakpoints[0].line, 3, 'breakpoint verification mismatch: line');
// should run to end
await Promise.all([
client.waitForEvent('terminated'),
client.continueRequest({threadId})
]);
});
示例4: testBreakpointHit
async function testBreakpointHit(program: string, line: number): Promise<void> {
await Promise.all([client.launch({program}), client.waitForEvent('initialized')]);
const breakpoint = (await client.setBreakpointsRequest({breakpoints: [{line}], source: {path: program}})).body.breakpoints[0];
assert.isTrue(breakpoint.verified, 'breakpoint verification mismatch: verified');
assert.equal(breakpoint.line, line, 'breakpoint verification mismatch: line');
await Promise.all([
client.configurationDoneRequest(),
assertStoppedLocation('breakpoint', program, line)
]);
}
示例5: beforeEach
beforeEach(async () => {
await Promise.all([
client.launch({program}),
client.waitForEvent('initialized')
]);
await client.setBreakpointsRequest({source: {path: program}, breakpoints: [{line: 17}]});
const [, event] = await Promise.all([
client.configurationDoneRequest(),
client.waitForEvent('stopped') as Promise<DebugProtocol.StoppedEvent>
]);
const stackFrame = (await client.stackTraceRequest({threadId: event.body.threadId})).body.stackFrames[0];
const scopes = (await client.scopesRequest({frameId: stackFrame.id})).body.scopes;
localScope = scopes.find(scope => scope.name === 'Locals');
superglobalsScope = scopes.find(scope => scope.name === 'Superglobals');
constantsScope = scopes.find(scope => scope.name === 'User defined constants');
});