klionmagical.blogg.se

Visual studio code extensions development
Visual studio code extensions development





visual studio code extensions development

Extension ManifestĮach VS Code extension must have a package.json as its Extension Manifest. However, let's focus on package.json and extension.ts, which are essential to understanding the Hello World extension.

visual studio code extensions development

tsconfig.json consult the TypeScript Handbook.launch.json used to configure VS Code Debugging.You can read more about the configuration files: ├── tsconfig.json // TypeScript configuration │ └── extension.ts // Extension source code ├── README.md // Readable description of your extension's functionality gitignore // Ignore build output and node_modules │ └── tasks.json // Config for build task that compiles TypeScript │ ├── launch.json // Config for launching and debugging the extension Let's take a closer look at Hello World sample's source code and see how these concepts apply to it. The Extension Capabilities Overview topic helps you find the right Contribution Point and VS Code API for your extension. In general, your extension would use a combination of Contribution Points and VS Code API to extend VS Code's functionality. VS Code API: a set of JavaScript APIs that you can invoke in your extension code.Contribution Points: static declarations that you make in the package.json Extension Manifest to extend VS Code.

visual studio code extensions development

Activation Events: events upon which your extension becomes active.Understanding these three concepts is crucial to writing extensions in VS Code: Uses the commands.registerCommand VS Code API to bind a function to the registered command ID helloworld.helloWorld.Uses the mands Contribution Point to make the command Hello World available in the Command Palette, and bind it to a command ID helloworld.helloWorld.Registers the onCommand Activation Event: onCommand:helloworld.helloWorld, so the extension becomes activated when user runs the Hello World command.In the last topic, you were able to get a basic extension running.







Visual studio code extensions development