vsls-debug-type v1.0.1
Visual Studio Live Share Debug Type
This library provides a reliable way of retrieving the type of the active VS Code debug session, even when the end-user is using Visual Studio Live Share.
Getting Started
Install this module into your VS Code debug adapter extension by running the following command
npm install -s vsls-debug-typeImport the
vsls-debug-typemodule, which returns a function for retrieving the debug sessiontypeCall this method anytime you need to retrieve the
typefor aDebugSessioninstance (e.g. within a handler for thevscode.debug.onDidStartDebugSessionevent)
// #1) Import this module
const vslsDebugType = require("vsls-debug-type");
vscode.debug.onDidStartDebugSession(session => {
const type = await vslsDebugType(session);
// Perform your custom logic
});API Reference
The vsls-debug-type module returns a single function, which accepts a VS Code DebugSession instance, and returns a Promise<string> that resolves to the type (e.g. dart, node, cpp) of the debug adapter that is associated with the specified DebugSession.