From 7036fdeaffe578efba11f32b96aa0c7b1d899cec Mon Sep 17 00:00:00 2001 From: Harsh Pratap Singh Date: Mon, 17 Apr 2023 06:59:59 +0530 Subject: [PATCH] Add debugging instructions (#1451) * Add debugging instructions * Apply suggestions from code review * Update CONTRIBUTING.md --------- Co-authored-by: Kris Stern --- CONTRIBUTING.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 877a55cf6..0d5f72aaa 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,7 +25,17 @@ Before submitting your change make sure that: See https://github.com/jenkinsci/gitlab-plugin/tree/master/src/docker/README.md +## Using IntelliJ's Debugger + +When testing with a Docker Jenkins instance, the debugger can be setup in the following way: +* From the main menu, select Run -> Edit Configurations. +* In the Run/Debug Configurations dialog, click the Add New Configuration button `+` and select Remote JVM Debug. +* Enter any relevant name, the Host (the address of the machine where the host app will run. If running it on the same machine, it needs to be localhost. If the program is running on another machine, specify its address here) and the Port (by default use 50000). The Command Line argument will be automatically setup. +* Enter Apply. + +Now start your Jenkins instance and debugger and you should get something like this - `Connected to the target VM, address: 'localhost:50000', transport: 'socket'`. +Breakpoints can now be set up to halt the debugger at the required break point to understand the flow of the program. + ## Release Workflow To perform a full plugin release, maintainers can run ``mvn release:prepare release:perform`` To release a snapshot, e.g. with a bug fix for users to test, just run ``mvn deploy`` -