Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-33209

Implement debugging similar to the Gretty plugin

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Minor Minor
    • gradle-jpi-plugin
    • None

      Changing environment variables to switch Jenkins debug mode on and off is inconvenient. Especially if working on several separate projects and you want to start them simultaneously.

      It will be very helpful if it will be possible to start in debug mode using Gradle task like it is done in Gretty

      http://akhikhl.github.io/gretty-doc/Debugger-support.html
      http://akhikhl.github.io/gretty-doc/Gretty-tasks.html

          [JENKINS-33209] Implement debugging similar to the Gretty plugin

          Are you talking about the stapler.trace, stapler.jelly.noCache and debug.YUI switches?

          If you do not want to specify command line argument or set GRADLE_OPTS, you can add the properties to your gradle.properties files:

          systemProp.stapler.trace=false
          systemProp.stapler.jelly.noCache=false
          systemProp.debug.YUI=false
          

          See https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_properties_and_system_properties

          Daniel Spilker added a comment - Are you talking about the stapler.trace , stapler.jelly.noCache and debug.YUI switches? If you do not want to specify command line argument or set GRADLE_OPTS , you can add the properties to your gradle.properties files: systemProp.stapler.trace= false systemProp.stapler.jelly.noCache= false systemProp.debug.YUI= false See https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_properties_and_system_properties

          Sergey Kadaner added a comment - - edited

          I did not explained myself good enough.

          I meant that gradlew run starts server regularly and gradlew debug will start in debug mode.

          Ability to configure port per Gradle configuration is also useful:

           appRunDebug {
                debugPort = 5005
                debugSuspend = true
              }
          
          

          Sergey Kadaner added a comment - - edited I did not explained myself good enough. I meant that gradlew run starts server regularly and gradlew debug will start in debug mode. Ability to configure port per Gradle configuration is also useful: appRunDebug { debugPort = 5005 debugSuspend = true }

          Steve Hill added a comment -

          Debugging the server task is possible by passing the -Dorg.gradle.debug=true parameter.

          Steve Hill added a comment - Debugging the server task is possible by passing the -Dorg.gradle.debug=true parameter .

            sghill Steve Hill
            sergeyk Sergey Kadaner
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: