xref: /aosp_15_r20/external/pigweed/pw_ide/guide/vscode/development.rst (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1*61c4878aSAndroid Build Coastguard Worker.. _module-pw_ide-guide-vscode-development:
2*61c4878aSAndroid Build Coastguard Worker
3*61c4878aSAndroid Build Coastguard Worker===========
4*61c4878aSAndroid Build Coastguard WorkerDevelopment
5*61c4878aSAndroid Build Coastguard Worker===========
6*61c4878aSAndroid Build Coastguard Worker.. pigweed-module-subpage::
7*61c4878aSAndroid Build Coastguard Worker   :name: pw_ide
8*61c4878aSAndroid Build Coastguard Worker
9*61c4878aSAndroid Build Coastguard WorkerThe Visual Studio Code extension is developed in the main Pigweed repository.
10*61c4878aSAndroid Build Coastguard WorkerIf you want to contribute to the extension, the first step is to become a
11*61c4878aSAndroid Build Coastguard Worker:ref:`Pigweed contributor<docs-contributing>`.
12*61c4878aSAndroid Build Coastguard Worker
13*61c4878aSAndroid Build Coastguard Worker---------------------
14*61c4878aSAndroid Build Coastguard WorkerWorking with the code
15*61c4878aSAndroid Build Coastguard Worker---------------------
16*61c4878aSAndroid Build Coastguard WorkerWhen working on the Visual Studio Code extension, it's more effective to open
17*61c4878aSAndroid Build Coastguard Workerthe extension's root directory instead of opening the repository root. That
18*61c4878aSAndroid Build Coastguard Workerdirectory is: ``<repo root>/pw_ide/ts/pigweed-vscode``
19*61c4878aSAndroid Build Coastguard Worker
20*61c4878aSAndroid Build Coastguard WorkerIf you're using Visual Studio Code to write code for the Visual Studio Code
21*61c4878aSAndroid Build Coastguard Workerextension, install any extensions that are recommended to you when you open
22*61c4878aSAndroid Build Coastguard Workerthe directory.
23*61c4878aSAndroid Build Coastguard Worker
24*61c4878aSAndroid Build Coastguard Worker----------------------
25*61c4878aSAndroid Build Coastguard WorkerBuilding the extension
26*61c4878aSAndroid Build Coastguard Worker----------------------
27*61c4878aSAndroid Build Coastguard WorkerStart by installing the dependencies: ``npm install``
28*61c4878aSAndroid Build Coastguard Worker
29*61c4878aSAndroid Build Coastguard WorkerThen the most effective way to work is to run the ``Run Extension`` launch
30*61c4878aSAndroid Build Coastguard Workerconfiguration. This will start a build watcher that will continuously build and
31*61c4878aSAndroid Build Coastguard Workerbundle the extension, and will launch a new Visual Studio Code instance with the
32*61c4878aSAndroid Build Coastguard Workercurrent build of the extension.
33*61c4878aSAndroid Build Coastguard Worker
34*61c4878aSAndroid Build Coastguard Worker.. note::
35*61c4878aSAndroid Build Coastguard Worker
36*61c4878aSAndroid Build Coastguard Worker   You need to have the `TypeScript + Webpack Problem Matchers <https://marketplace.visualstudio.com/items?itemName=amodio.tsl-problem-matcher>`_
37*61c4878aSAndroid Build Coastguard Worker   extension installed for the above to work.
38*61c4878aSAndroid Build Coastguard Worker
39*61c4878aSAndroid Build Coastguard Worker-----------------------
40*61c4878aSAndroid Build Coastguard WorkerPackaging the extension
41*61c4878aSAndroid Build Coastguard Worker-----------------------
42*61c4878aSAndroid Build Coastguard WorkerIt's one command: ``npm run package``
43