本文整理匯總了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 } )
]);
});