How to use vscode-debugadapter-testsupport - 1 common examples

To help you get started, we’ve selected a few vscode-debugadapter-testsupport examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vscjavaci / java-debug-ci / src / debug / test-utils.js View on Github external
export async function createDebugEngine(DATA_ROOT, LANGUAGE_SERVER_ROOT, LANGUAGE_SERVER_WORKSPACE, config) {

    if (!fs.isDirectorySync(DATA_ROOT)) {
        throw new Error(`${DATA_ROOT} doesn't exist.`);
    }
    if (!fs.isDirectorySync(LANGUAGE_SERVER_ROOT)) {
        throw new Error(`${LANGUAGE_SERVER_ROOT} doesn't exist.`);
    }


    const promise1 = startDebugServer(DATA_ROOT);
    mkdirp.sync(LANGUAGE_SERVER_WORKSPACE);
    startLS(LANGUAGE_SERVER_ROOT, LANGUAGE_SERVER_WORKSPACE);
    const port = parseInt(await promise1);
    await promise1;
    const dc = new DebugClient('java');
    await dc.start(port);
    const engine = new DebugEngine(DATA_ROOT, dc, {
        "cwd": DATA_ROOT,
        "startupClass": config.mainClass,
        "classpath": path.join(DATA_ROOT, config.outputPath),
        "sourcePath": [
            path.join(DATA_ROOT, config.sourcePath)
        ]
    });
    config.withEngine(engine);
    dc.on('terminated', (event) => {
        engine.handleEvent('terminated').then(() => {
            engine.promiseResolve('terminated');
        });
    });
    dc.on('output', event => {

vscode-debugadapter-testsupport

Npm module with mocha test support for Visual Studio Code debug adapters

MIT
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis

Popular vscode-debugadapter-testsupport functions

Similar packages