From c3dd8baa7b67dbfa5e04d3d939c2cf1774fd6a3e Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 27 Feb 2024 13:07:44 +0100 Subject: [PATCH] Extend development guide Scavenge information from a fresh extension's quickstart document and put it into Development.md. Fixes: VSCODEEXT-37 Change-Id: Ie8d4d8d5ff1c6ef63b10daa03b41e2b9e2148b54 Reviewed-by: Marcus Tillmanns --- Development.md | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/Development.md b/Development.md index b1097ad..223004f 100644 --- a/Development.md +++ b/Development.md @@ -1,10 +1,17 @@ # Development Guide -## Build +## Build on the command line - To install dependencies, run `npm ci` - To compile, run `npm run compile` +## Running the extension from VS Code + +* Press `F5` to open a new window with your extension loaded. +* You can relaunch the extension from the debug toolbar after changing code. +* You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load + your changes. + ## Pre-Commit Before every commit, the following commands should be run: @@ -27,12 +34,25 @@ build together, run `npm run pretest` - To install the package to vscode, run `code --install-extension ` -## Testing +## Run tests on the command line - To run unit tests, run `npm run unitTests` - To run integration tests, run `npm run integrationTests -- --qt_path=""` - To run all tests, run `npm run allTests -- --qt_path=""` +## Run tests from Visual Studio Code + +* Open the debug viewlet (`Ctrl+Shift+D` or `Cmd+Shift+D` on Mac) and from the launch configuration + dropdown pick `Extension Tests`. +* Press `F5` to run the tests in a new window with your extension loaded. +* See the output of the test result in the debug console. + +## Further reading + +* Explore the VS Code API by inspecting the file`node_modules/@types/vscode/index.d.ts`. +* [Follow UX guidelines](https://code.visualstudio.com/api/ux-guidelines/overview) to create + extensions that seamlessly integrate with VS Code's native interface and patterns. + ## Dependencies - [npm](https://www.npmjs.com/)