本文整理匯總了TypeScript中vscode-debugadapter-testsupport.DebugClient.setExceptionBreakpointsRequest方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript DebugClient.setExceptionBreakpointsRequest方法的具體用法?TypeScript DebugClient.setExceptionBreakpointsRequest怎麽用?TypeScript DebugClient.setExceptionBreakpointsRequest使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類vscode-debugadapter-testsupport.DebugClient
的用法示例。
在下文中一共展示了DebugClient.setExceptionBreakpointsRequest方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: 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')
]);
});
示例2: it
it('should not hit a caught exception breakpoint when those are disabled', async function() {
await dc.setExceptionBreakpointsRequest({filters: [ 'uncaught' ]});
util.evaluateCloaked(dc, 'throwAndCatchException()');
await util.assertPromiseTimeout(util.receiveStoppedEvent(dc), 1000);
});
示例3:
dc.waitForEvent('initialized').then(event => {
return dc.setExceptionBreakpointsRequest({
filters: [ 'uncaught' ]
});
}).then(response => {