|
1 | 1 | # Welcome to your first VS Code Extension
|
2 | 2 |
|
3 | 3 | ## What's in the folder
|
4 |
| -* This folder contains all of the files necessary for your extension |
5 |
| -* `package.json` - this is the manifest file in which you declare your extension and command. |
6 |
| -The sample plugin registers a command and defines its title and command name. With this information |
7 |
| -VS Code can show the command in the command palette. It doesn’t yet need to load the plugin. |
8 |
| -* `src/extension.ts` - this is the main file where you will provide the implementation of your command. |
9 |
| -The file exports one function, `activate`, which is called the very first time your extension is |
10 |
| -activated (in this case by executing the command). Inside the `activate` function we call `registerCommand`. |
11 |
| -We pass the function containing the implementation of the command as the second parameter to |
12 |
| -`registerCommand`. |
| 4 | + |
| 5 | +- This folder contains all of the files necessary for your extension |
| 6 | +- `package.json` - this is the manifest file in which you declare your extension and command. |
| 7 | + The sample plugin registers a command and defines its title and command name. With this information |
| 8 | + VS Code can show the command in the command palette. It doesn’t yet need to load the plugin. |
| 9 | +- `src/extension.ts` - this is the main file where you will provide the implementation of your command. |
| 10 | + The file exports one function, `activate`, which is called the very first time your extension is |
| 11 | + activated (in this case by executing the command). Inside the `activate` function we call `registerCommand`. |
| 12 | + We pass the function containing the implementation of the command as the second parameter to |
| 13 | + `registerCommand`. |
13 | 14 |
|
14 | 15 | ## Get up and running straight away
|
15 |
| -* press `F5` to open a new window with your extension loaded |
16 |
| -* run your command from the command palette by pressing (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) and typing `Hello World` |
17 |
| -* set breakpoints in your code inside `src/extension.ts` to debug your extension |
18 |
| -* find output from your extension in the debug console |
| 16 | + |
| 17 | +- press `F5` to open a new window with your extension loaded |
| 18 | +- run your command from the command palette by pressing (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) and typing `Hello World` |
| 19 | +- set breakpoints in your code inside `src/extension.ts` to debug your extension |
| 20 | +- find output from your extension in the debug console |
19 | 21 |
|
20 | 22 | ## Make changes
|
21 |
| -* you can relaunch the extension from the debug toolbar after changing code in `src/extension.ts` |
22 |
| -* you can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes |
| 23 | + |
| 24 | +- you can relaunch the extension from the debug toolbar after changing code in `src/extension.ts` |
| 25 | +- you can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes |
23 | 26 |
|
24 | 27 | ## Explore the API
|
25 |
| -* you can open the full set of our API when you open the file `node_modules/vscode/vscode.d.ts` |
| 28 | + |
| 29 | +- you can open the full set of our API when you open the file `node_modules/vscode/vscode.d.ts` |
26 | 30 |
|
27 | 31 | ## Run tests
|
28 |
| -* open the debug viewlet (`Ctrl+Shift+D` or `Cmd+Shift+D` on Mac) and from the launch configuration dropdown pick `Launch Tests` |
29 |
| -* press `F5` to run the tests in a new window with your extension loaded |
30 |
| -* see the output of the test result in the debug console |
31 |
| -* make changes to `test/extension.test.ts` or create new test files inside the `test` folder |
32 |
| - * by convention, the test runner will only consider files matching the name pattern `**.test.ts` |
33 |
| - * you can create folders inside the `test` folder to structure your tests any way you want |
| 32 | + |
| 33 | +- open the debug viewlet (`Ctrl+Shift+D` or `Cmd+Shift+D` on Mac) and from the launch configuration dropdown pick `Launch Tests` |
| 34 | +- press `F5` to run the tests in a new window with your extension loaded |
| 35 | +- see the output of the test result in the debug console |
| 36 | +- make changes to `test/extension.test.ts` or create new test files inside the `test` folder |
| 37 | + - by convention, the test runner will only consider files matching the name pattern `**.test.ts` |
| 38 | + - you can create folders inside the `test` folder to structure your tests any way you want |
0 commit comments