Noticeably Playful Monkeys

    @vscode/debugadapter-testsupport
    TypeScript icon, indicating that this package has built-in type declarations

    1.56.0 • Public • Published

    Test Support for VS Code Debug Adapters

    NPM Version NPM Downloads

    Npm module with support classes for writing automated tests for a VS Code debug adapter.

    The module provides a toolkit with Promise-based building blocks for individual protocol requests (e.g. stepInRequest) and for common request sequences (e.g. hitBreakpoint). These building blocks can be easily configured for a specific adapter and combined to form complex scenarios.

    Here are three example Mocha tests:

    var dc: DebugClient;
    
    setup( () => {
        dc = new DebugClient('node', './out/node/nodeDebug.js', 'node');
        return dc.start();
    });
    
    teardown( () => dc.stop() );
    
    
    test('should run program to the end', () => {
        return Promise.all([
            dc.configurationSequence(),
            dc.launch({ program: "main.js" }),
            dc.waitForEvent('terminated')
        ]);
    });
    
    test('should stop on entry', () => {
        return Promise.all([
            dc.configurationSequence(),
            dc.launch({ program: "main.js", stopOnEntry: true }),
            dc.assertStoppedLocation('entry', 1)
        ]);
    });
    
    test('should stop on a breakpoint', () => {
        return dc.hitBreakpoint({ program: "main.js" }, "test.js", 15);
    });

    License

    MIT

    Keywords

    none

    Install

    npm i @vscode/debugadapter-testsupport

    DownloadsWeekly Downloads

    958

    Version

    1.56.0

    License

    MIT

    Unpacked Size

    90.9 kB

    Total Files

    10

    Last publish

    Collaborators

    • lramos15
    • sbatten
    • aweinand
    • hticehurst
    • rchiodo
    • rebornix
    • bpasero
    • raymondzhao
    • mistople
    • kaimaetzel
    • connor.peet
    • roblourens
    • chrmarti
    • tyriar
    • jrieken
    • alexandrudima
    • tylerl0706
    • miguelsolorio
    • deepak_robo
    • aeschli