本文整理汇总了TypeScript中vscode-chrome-debug-core-testsupport.ExtendedDebugClient类的典型用法代码示例。如果您正苦于以下问题:TypeScript ExtendedDebugClient类的具体用法?TypeScript ExtendedDebugClient怎么用?TypeScript ExtendedDebugClient使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ExtendedDebugClient类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: suite
suite('Chrome Debug Adapter etc', () => {
let dc: ExtendedDebugClient;
setup(() => {
return testSetup.setup()
.then(_dc => dc = _dc);
});
teardown(() => {
return testSetup.teardown();
});
suite('basic', () => {
test('unknown request should produce error', done => {
dc.send('illegal_request').then(() => {
done(new Error('does not report error on unknown request'));
}).catch(() => {
done();
});
});
});
suite('initialize', () => {
test('should return supported features', () => {
return dc.initializeRequest().then(response => {
assert.equal(response.body.supportsConfigurationDoneRequest, true);
});
});
});
suite('launch', () => {
test('should stop on debugger statement in file:///, sourcemaps disabled', () => {
const testProjectRoot = path.join(DATA_ROOT, 'intervalDebugger');
const launchFile = path.join(testProjectRoot, 'index.html');
const breakFile = path.join(testProjectRoot, 'out/app.js');
const DEBUGGER_LINE = 2;
return Promise.all([
dc.configurationSequence(),
dc.launch({ file: launchFile, sourceMaps: false }),
dc.assertStoppedLocation('debugger_statement', { path: breakFile, line: DEBUGGER_LINE } )
]);
});
test('should stop on debugger statement in http://localhost', () => {
const testProjectRoot = path.join(DATA_ROOT, 'intervalDebugger');
const breakFile = path.join(testProjectRoot, 'src/app.ts');
const DEBUGGER_LINE = 2;
const server = createServer({ root: testProjectRoot });
server.listen(7890);
return Promise.all([
dc.configurationSequence(),
dc.launch({ url: 'http://localhost:7890', webRoot: testProjectRoot }),
dc.assertStoppedLocation('debugger_statement', { path: breakFile, line: DEBUGGER_LINE } )
])
.then(
() => server.close(),
e => {
server.close();
throw e;
});
});
});
});
示例2: test
test('should stop on debugger statement in file:///, sourcemaps disabled', () => {
const testProjectRoot = path.join(DATA_ROOT, 'intervalDebugger');
const launchFile = path.join(testProjectRoot, 'index.html');
const breakFile = path.join(testProjectRoot, 'out/app.js');
const DEBUGGER_LINE = 2;
return Promise.all([
dc.configurationSequence(),
dc.launch({ file: launchFile, sourceMaps: false }),
dc.assertStoppedLocation('debugger_statement', { path: breakFile, line: DEBUGGER_LINE } )
]);
});