本文整理匯總了TypeScript中vscode-debugadapter-testsupport.DebugClient.hitBreakpoint方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript DebugClient.hitBreakpoint方法的具體用法?TypeScript DebugClient.hitBreakpoint怎麽用?TypeScript DebugClient.hitBreakpoint使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類vscode-debugadapter-testsupport.DebugClient
的用法示例。
在下文中一共展示了DebugClient.hitBreakpoint方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: test
test('should stop on a breakpoint in file with spaces in its name', () => {
const PROGRAM = Path.join(DATA_ROOT, 'folder with spaces', 'file with spaces.js');
const BREAKPOINT_LINE = 2;
return dc.hitBreakpoint({ program: PROGRAM }, { path: PROGRAM, line: BREAKPOINT_LINE} );
});
示例2: test
test('should return current file/line informatiom from custom request', () => {
const PROGRAM = Path.join(DATA_ROOT, 'test.md');
const BREAKPOINT_LINE = 2;
return dc.hitBreakpoint({ program: PROGRAM }, { path: PROGRAM, line: BREAKPOINT_LINE } ).then(_ => {
return dc.send('infoRequest').then(response => {
assert.equal(response.body.currentFile, PROGRAM, "response mismatch: 'currentFile'");
assert.equal(response.body.currentLine, BREAKPOINT_LINE, "response mismatch: 'currentLine'");
});
});
});
示例3: test
test('should stop on a breakpoint in source (all files top level, missing sourceMappingURL)', () => {
const PROGRAM = Path.join(DATA_ROOT, 'sourcemaps-simple-no-sourceMappingURL/classes.js');
const TS_SOURCE = Path.join(DATA_ROOT, 'sourcemaps-simple-no-sourceMappingURL/classes.ts');
const TS_LINE = 17;
return dc.hitBreakpoint({
program: PROGRAM,
runtimeArgs: [ '--nolazy' ]
}, {
path: TS_SOURCE,
line: TS_LINE
});
});