本文整理汇总了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
});
});