diff --git a/Documentation/dev-intellij.txt b/Documentation/dev-intellij.txt index 9b8f7a06f1..13216ec1f5 100644 --- a/Documentation/dev-intellij.txt +++ b/Documentation/dev-intellij.txt @@ -151,6 +151,11 @@ The copied run configurations will be added automatically to the available run configurations of the IntelliJ project. ==== Gerrit Daemon +WARNING: At the moment running this configuration results in a +`java.io.FileNotFoundException`. To debug a local Gerrit server with IntelliJ, +use the instructions of <> in +combination with <>. + Copy `$(gerrit_source_code)/tools/intellij/gerrit_daemon.xml` to `$(project_data_directory)/.idea/runConfigurations/`. @@ -173,6 +178,17 @@ TIP: If you would like to execute a test in NoteDb mode, add `--test_env=GERRIT_NOTEDB=READ_WRITE` to the *Bazel flags* of your run configuration. +[[remote-debug]] +=== Debugging a remote Gerrit server +If a remote Gerrit server is running and has opened a debug port, you can attach +IntelliJ via a `Remote debug configuration`. + +. Go to *Run -> Edit Configurations*. +. Click on the *+* to add a new configuration. +. Choose *Remote*. +. Adjust *Configuration -> Settings -> Host* and *Port*. +. Start this configuration in `Debug` mode. + GERRIT ------ Part of link:index.html[Gerrit Code Review] diff --git a/Documentation/dev-readme.txt b/Documentation/dev-readme.txt index 873b9aca3b..b7c111f6d7 100644 --- a/Documentation/dev-readme.txt +++ b/Documentation/dev-readme.txt @@ -159,6 +159,16 @@ copying to the test site: NOTE: Please refer to <> for details why using `java -jar` isn't sufficient. +If you want to debug the Gerrit server of this test site, you can open a debug +port (for example port 5005) by inserting + +---- +-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 +---- + +directly after `-jar` of the previous command. Please refer to +<> for instructions +of how to attach IntelliJ. === Running the Daemon with Gerrit Inspector