|
| 1 | +## Extension installation from source code |
| 2 | + |
| 3 | +Install Node.js (v14 or later recommended). |
| 4 | + |
| 5 | +### Local Installation |
| 6 | + |
| 7 | +1. Clone this repository |
| 8 | +2. Navigate to the extension directory: |
| 9 | + ```bash |
| 10 | + cd vscode |
| 11 | + ``` |
| 12 | +3. Install dependencies: |
| 13 | + ```bash |
| 14 | + npm install |
| 15 | + ``` |
| 16 | +4. Package the extension: |
| 17 | + ```bash |
| 18 | + npm install -g @vscode/vsce |
| 19 | + vsce package |
| 20 | + ``` |
| 21 | + This will create a `.vsix` file in the current directory. |
| 22 | + |
| 23 | +5. Install the extension in VSCode: |
| 24 | + - Launch VS Code |
| 25 | + - Go to the Extensions view (Ctrl+Shift+X) |
| 26 | + - Click on the "..." menu in the top-right of the Extensions view |
| 27 | + - Select "Install from VSIX..." |
| 28 | + - Navigate to and select the `.vsix` file you created |
| 29 | + |
| 30 | +### Alternative Installation Method |
| 31 | + |
| 32 | +You can also install the extension directly from the source code: |
| 33 | + |
| 34 | +1. Copy the `vscode` folder (rename it if necessary) to your VSCode extensions directory: |
| 35 | + - Windows: `%USERPROFILE%\.vscode\extensions` |
| 36 | + - macOS/Linux: `~/.vscode/extensions` |
| 37 | + |
| 38 | +2. Restart VSCode |
| 39 | + |
| 40 | +## Development |
| 41 | + |
| 42 | +1. Clone this repository and cd into `vscode` directory |
| 43 | +2. Run `npm install` |
| 44 | +3. Open the project in VS Code |
| 45 | +4. Press F5 to start debugging (this will launch a new VSCode window with the extension loaded) |
| 46 | +5. Make changes to the extension |
| 47 | +6. Reload the debugging window to see your changes (Ctrl+R or Cmd+R) |
| 48 | + |
| 49 | +### Reloading the Extension During Development |
| 50 | + |
| 51 | +When making changes to the extension, you can reload it without uninstalling and reinstalling: |
| 52 | + |
| 53 | +1. **Using the Command Palette**: |
| 54 | + - Press `Ctrl+Shift+P` (or `Cmd+Shift+P` on macOS) |
| 55 | + - Type "Developer: Reload Window" and select it |
| 56 | + |
| 57 | +2. **Using keyboard shortcut**: |
| 58 | + - Press `Ctrl+R` (or `Cmd+R` on macOS) |
| 59 | + |
| 60 | +3. **For extensions installed from folder**: |
| 61 | + - Make your changes to the extension files |
| 62 | + - Run the "Developer: Reload Window" command as described above |
| 63 | + - VSCode will reload with the updated extension |
| 64 | + |
| 65 | +4. **For more substantial changes**: |
| 66 | + - If you've made significant changes to the extension's structure or manifest |
| 67 | + - You may need to restart VSCode completely (close and reopen) |
| 68 | + - In some cases, you might need to run the command "Developer: Restart Extension Host" |
0 commit comments