summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.md30
-rw-r--r--docs/assets/connected_devtools.pngbin0 -> 121743 bytes
2 files changed, 29 insertions, 1 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index aa129b16..c878257c 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -143,7 +143,7 @@ For more detailed architecture, see `docs/architecture.md`.
## Debugging
-To debug the CLI application using VS Code:
+### VS Code:
1. Start the CLI in debug mode from the root directory:
```bash
@@ -160,6 +160,34 @@ To hit a breakpoint inside the sandbox container run:
DEBUG=1 gemini
```
+### React DevTools
+
+To debug the CLI's React-based UI, you can use React DevTools. Ink, the library used for the CLI's interface, is compatible with React DevTools version 4.x.
+
+1. **Start the Gemini CLI in development mode:**
+
+ ```bash
+ DEV=true npm start
+ ```
+
+2. **Install and run React DevTools version 4.28.5 (or the latest compatible 4.x version):**
+
+ You can either install it globally:
+
+ ```bash
+ npm install -g [email protected]
+ react-devtools
+ ```
+
+ Or run it directly using npx:
+
+ ```bash
+ ```
+
+ Your running CLI application should then connect to React DevTools.
+ ![](/docs/assets/connected_devtools.png)
+
## Sandboxing
### MacOS Seatbelt
diff --git a/docs/assets/connected_devtools.png b/docs/assets/connected_devtools.png
new file mode 100644
index 00000000..34a3c568
--- /dev/null
+++ b/docs/assets/connected_devtools.png
Binary files differ