You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This example shows how to implement a client for the `csolution-rpc` interface inside a vscode extension.
4
+
5
+
It uses the Microsoft [vscode-jsonrpc](https://www.npmjs.com/package/vscode-jsonrpc) npm module which is typically the base messaging protocol spoken between a VSCode language server and a client.
6
+
7
+
## Get started
8
+
9
+
1. Make sure the [`json-rpc-codegen`](../../codegen/README.md) utility is compiled in this workspace.
10
+
11
+
2. Generate the client interface file `src/rpc-interface.ts` by calling:
12
+
```
13
+
npm run gen-rpc-interface
14
+
```
15
+
3. Inside the editor, open `src/extension.ts` and press F5 or run the command `Debug: Start Debugging` from the Command Palette (Ctrl+Shift+P). This will compile and run the extension in a new Extension Development Host window.
16
+
17
+
4. Run the `csolution-rpc` commands from the Command Palette (Ctrl+Shift+P) in the new window:
18
+
19
+

20
+
21
+
The commands `getVersion` and `shutdown` are currently available in this example.
22
+
23
+
> :memo: Note: The `csolution` binary must have the RPC server functionality and must be in the system PATH. Install the CMSIS-Toolbox from [nightly artifacts](https://github.com/Open-CMSIS-Pack/cmsis-toolbox/actions/workflows/nightly.yml) or build it in your local environment.
0 commit comments