From f6ca92b45c7711e9fa7a314703f0573a58aca2e3 Mon Sep 17 00:00:00 2001 From: Tomasz Pasternak Date: Tue, 15 Oct 2024 23:21:31 -0700 Subject: [PATCH 1/2] doc: Document the starlark debugger --- docs/starlark_debugger.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 docs/starlark_debugger.md diff --git a/docs/starlark_debugger.md b/docs/starlark_debugger.md new file mode 100644 index 00000000000..5f29fbbb1d9 --- /dev/null +++ b/docs/starlark_debugger.md @@ -0,0 +1,24 @@ +# Debugging Starlark with the IntelliJ Plugin + +To debug Starlark, you need to create a `build` run configuration. You can do this in two ways: manually create a new configuration or reuse an existing one. + +## Method 1: Create a Run Configuration Manually + +1. Open the **Run Configurations** menu. +2. Click the `+` icon to add a new configuration. +3. Select **Bazel Command** from the list. +4. Enter the target expression in the **Target** field. +5. Set the **Bazel Command** field to `build`. + +## Method 2: Reuse an Existing Run Configuration + +1. Run the target using an existing configuration. +2. Open the **Run Configurations** editor. +3. Change the **Command** field to `build`. +4. Run the configuration again. + +**Important:** Before starting the debugger, ensure you have modified something in the Starlark file. If no changes are made, Bazel will use the analysis cache and skip executing the Starlark code. + +## Demo: Showing Both Methods +https://github.com/user-attachments/assets/8511bd9f-6d47-4627-b617-0c90edd9f30b + From 1adee47ec90c8009257b1dd8c16d043d9a81c20f Mon Sep 17 00:00:00 2001 From: Tomasz Pasternak Date: Tue, 15 Oct 2024 23:26:20 -0700 Subject: [PATCH 2/2] Update starlark_debugger.md --- docs/starlark_debugger.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/starlark_debugger.md b/docs/starlark_debugger.md index 5f29fbbb1d9..a8b2785c4d6 100644 --- a/docs/starlark_debugger.md +++ b/docs/starlark_debugger.md @@ -20,5 +20,5 @@ To debug Starlark, you need to create a `build` run configuration. You can do th **Important:** Before starting the debugger, ensure you have modified something in the Starlark file. If no changes are made, Bazel will use the analysis cache and skip executing the Starlark code. ## Demo: Showing Both Methods -https://github.com/user-attachments/assets/8511bd9f-6d47-4627-b617-0c90edd9f30b +https://github.com/user-attachments/assets/959b3d53-f79b-4329-bd3b-74d328af761a