Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vscode/debugadapter-testsupport

Package Overview
Dependencies
Maintainers
0
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vscode/debugadapter-testsupport

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

  • 1.68.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

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

FAQs

Package last updated on 03 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc