Skip to content

Commit 06865f4

Browse files
JessicaJHeedatho7561
authored andcommitted
Update extension debug documentation
Signed-off-by: Jessica He <jhe@redhat.com>
1 parent bdf500f commit 06865f4

File tree

2 files changed

+30
-13
lines changed

2 files changed

+30
-13
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v16.13.2
1+
v16.17.1

CONTRIBUTING.md

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ There are only a few guidelines that we need contributors to follow.
88
## First Time Setup
99
1. Install prerequisites:
1010
* latest [Visual Studio Code](https://code.visualstudio.com/)
11-
* [Node.js](https://nodejs.org/) v4.0.0 or higher
11+
* [Node.js](https://nodejs.org/) v16.17.0 or higher
12+
* It is recommended to set up `nvm` to manage different versions of node, which can be installed by following the instructions [here](https://github.com/nvm-sh/nvm#installing-and-updating).
13+
* To use the current recommended version for this project (in`./nvmrc`), run `nvm use`.
14+
1215
2. Fork and clone the repository
1316
3. `cd vscode-openshift-tools`
1417
4. Install the dependencies:
@@ -18,22 +21,36 @@ There are only a few guidelines that we need contributors to follow.
1821
```
1922
5. Open the folder in VS Code
2023

21-
## Run the extension locally
24+
## Run and debug the extension locally
25+
26+
1. Build with the following command at least once before running in debug mode:
27+
28+
```bash
29+
$ npm run build
30+
```
31+
32+
* This downloads the `oc` and `odo` binaries and compiles webviews.
33+
2. The extension can now be launched with the `Extension` launch option in the Run and Debug tab (`Ctrl+Shift+D`) in VS Code.
34+
* Note: breakpoints in webview code will not work
35+
3. After making any changes, consider the following before relaunching the extension to ensure the changes are recompiled:
36+
* Changes made to webviews in `src/webview/$WEBVIEW_NAME/app` can be compiled with the corresponding command:
37+
38+
```bash
39+
$ npm run dev:compile:$WEBVIEW_NAME
40+
```
2241

23-
1. Install `vsce` - A command line tool you'll use to publish extensions to the Extension Marketplace.
24-
```bash
25-
$ npm install -g vsce
26-
```
27-
2. From root folder, run the below command.
28-
```bash
29-
$ vsce package
30-
```
31-
3. `openshift-toolkit-<version>.vsix` file is created. Install it by following the instructions [here](https://code.visualstudio.com/docs/editor/extension-gallery#_install-from-a-vsix).
42+
* The list of commands to build the webviews can be found in `package.json` or by running `npm run`
43+
* Changes in version of one of the required tools in `src/tools.json`, run:
3244

45+
```bash
46+
$ npm run bundle-tools
47+
```
3348

49+
* Any other changes should be recompiled automatically by the VS Code prelaunch task.
50+
* The launch will be prevented if there are compilation errors.
3451
4. Once the extension is installed and reloaded, there will be an OpenShift Icon on the View Container, on the lines of snap mentioned below.
3552

36-
![View Container OpenShift](https://github.com/redhat-developer/vscode-openshift-tools/blob/master/images/view-container-icon.png)
53+
![View Container OpenShift](images/view-container-icon.png)
3754

3855
## Running the Integration Test Suite
3956

0 commit comments

Comments
 (0)