Socket
Book a DemoInstallSign in
Socket

@vscode/debugprotocol

Package Overview
Dependencies
Maintainers
7
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vscode/debugprotocol

Npm module with declarations for the Visual Studio Code debug protocol

latest
Source
npmnpm
Version
1.68.0
Version published
Weekly downloads
204K
1%
Maintainers
7
Weekly downloads
 
Created

What is @vscode/debugprotocol?

@vscode/debugprotocol is a package that provides the Debug Adapter Protocol (DAP) used by Visual Studio Code and other IDEs to facilitate communication between the editor and a debugger. It defines a set of requests and events that allow for debugging operations such as setting breakpoints, stepping through code, and inspecting variables.

What are @vscode/debugprotocol's main functionalities?

Initialize Request

The initialize request is the first message sent from the client to the debug adapter. It is used to configure the debug session and exchange capabilities. The code sample shows how to send an initialize request with various configuration options.

{ "command": "initialize", "arguments": { "clientID": "vscode", "clientName": "Visual Studio Code", "adapterID": "node", "pathFormat": "path", "linesStartAt1": true, "columnsStartAt1": true, "supportsVariableType": true, "supportsVariablePaging": true, "supportsRunInTerminalRequest": true } }

Set Breakpoints Request

The setBreakpoints request allows the client to set breakpoints in the source code. The code sample demonstrates how to specify breakpoints at specific lines in a given file.

{ "command": "setBreakpoints", "arguments": { "source": { "path": "/path/to/file.js" }, "breakpoints": [ { "line": 10 }, { "line": 20 } ] } }

Stack Trace Request

The stackTrace request retrieves the call stack for a given thread. This is useful for understanding the current execution context. The code sample shows how to request the stack trace for a specific thread.

{ "command": "stackTrace", "arguments": { "threadId": 1 } }

Other packages similar to @vscode/debugprotocol

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