It is called Mock Debug because it does not talk to a real debugger, but mocks one. Since creating a debug adapter from scratch is a bit heavy for this tutorial, we will start with a simple DA which we have created as an educational "debug adapter starter kit". In the rest of this document we show how to develop a debugger extension. Verify or modify debug configurations before they are passed to the debug adapter.Determine the debug adapter to use dynamically.Dynamically generated default debug configurations for the initial launch.json created by VS Code.In addition to the purely declarative contributions from above, the Debug Extension API enables this code-based functionality: You can find more information in contributes.breakpoints and buggers references. Declaration of variables that can be used in debug configurations. Debug configuration snippets that a user can add to a launch.json file.Default debug configurations for the initial launch.json created by VS Code.Please note that the JSON schema constructs $ref and definition are not supported. VS Code uses this schema to verify the configuration in the launch.json editor and provides IntelliSense. Mention- JSON schema for the debug configuration attributes introduced by the debugger. VS Code enables the UI to set breakpoints for those languages. List of languages supported by the debugger.So in its most minimal form, a debugger extension is just a declarative contribution of a debug adapter implementation and the extension is basically a packaging container for the debug adapter without any additional code.Ī more realistic debugger extension contributes many or all of the following declarative items to VS Code: VS Code launches the registered DA whenever the user starts a debug session of that type. Since debug adapters are independent from VS Code and can be used in other developments tools, they do not match VS Code's extensibility architecture which is based on extensions and contribution points.įor this reason VS Code provides a contribution point, debuggers, where a debug adapter can be contributed under a specific debug type (e.g. The history of and motivation behind DAP is explained in this blog post. Since the Debug Adapter Protocol is independent from VS Code, it has its own web site where you can find an introduction and overview, the detailed specification, and some lists with known implementations and supporting tools. We call this intermediary the Debug Adapter (or DA for short) and the abstract protocol that is used between the DA and VS Code is the Debug Adapter Protocol ( DAP for short). This intermediary is typically a standalone process that communicates with the debugger. VS Code implements a generic (language-agnostic) debugger UI based on an abstract protocol that we've introduced to communicate with debugger backends.īecause debuggers typically do not implement this protocol, some intermediary is needed to "adapt" the debugger to the protocol. This documentation will help you create a debugger extension which can make any debugger work with VS Code.
0 Comments
Leave a Reply. |