Skip to content

Commit

Permalink
Gapic readme (#1254)
Browse files Browse the repository at this point in the history
* [gapic] Add java debugging logic and documentation

* [docs] Update gapic readme
  • Loading branch information
rosasco-wk authored Jan 14, 2023
1 parent 55d9614 commit 7ae8fe7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
9 changes: 5 additions & 4 deletions DEVDOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,6 @@ Bazel flag, e.g.:
bazel build -c dbg pkg
```

The recommended Go debugger is
[delve](https://github.com/go-delve/delve).

### Debugging Gapic

Gapic, the AGI UI, is written in Java. Gapic is launched with `java` by gapid Go code in
Expand Down Expand Up @@ -145,9 +142,13 @@ You should see the following output: `Waiting for java debugger to attach to por
debug from **vscode** normally using the new launch configuration that you you added in step (3)
above.


### Debugging Gapis

To debug gapis, you can do:
Gapis is written in **Go**. The recommended Go debugger is
[delve](https://github.com/go-delve/delve).

To debug gapis, using a debug build, you can do:

```
dlv exec ./bazel-bin/pkg/gapis -- -enable-local-files -persist -rpc localhost:8888
Expand Down
23 changes: 14 additions & 9 deletions gapic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,25 @@
`ln -s $(bazel info output_base)/external bazel-external`
- Windows Command Prompt:
``for /f usebackq %F in (`bazel info output_base`) do mklink /J bazel-external "%F/external"``

2. Create and open a new Eclipse workspace.
3. Open the Eclipse Preferences and navigate to **General** -> **Workspace** -> **Linked Resources**.
4. Click **New...** to define a new path variable:
1. Set the name to `GAPIC_PLATFORM_SRC`.
2. Set the value to the your platform's folder inside the gapic/src/platform folder of the AGI checkout, e.g. `<gitroot>/gapic/src/platform/<OS>`
3. Click **OK** to create the variable.
5. Click **Apply and Close** to dismiss the preferences dialog.
6. Run the bazel build to build all the generated code.
7. Select **File** -> **Import** and then **General** -> **Existing Projects into Workspace** and click **Next**.

3. Open the Eclipse **Window** -> **Preferences** and navigate to **General** -> **Workspace** -> **Linked Resources**.
1. Click **New...** to define a new path variable:
2. Set the name to `GAPIC_PLATFORM_SRC`.
3. Set the value to the your platform's folder inside the gapic/src/platform folder of the AGI checkout, e.g. `<gitroot>/gapic/src/platform/<OS>`
4. Click **OK** to create the variable.
5. Click **Apply and Close** to dismiss the preferences dialog.

4. Run the bazel build to build all the generated code.

5. Select **File** -> **Import** and then **General** -> **Existing Projects into Workspace** and click **Next**.
1. Enter the location of your AGI checkout into the root directory box.
2. Click **Select All**. You should see a project named gapic.
3. **IMPORTANT**: Uncheck **Copy projects into workspace**
4. Click **Finish**.
8. Set up **Run Configurations**.

6. Select **Run** -> **Run Configurations**.
1. Select **Java Application**.
2. Press the button for a new configuration.
3. Choose a name, e.g. "Default".
Expand Down

0 comments on commit 7ae8fe7

Please sign in to comment.