Hi Albin,

what you are trying to do is a remote debugging.
That is described in the link Jesse provided:
http://www.google.com/url?sa=D&q=https://wiki.jenkins-ci.org/display/JENKINS/Plugin%2Btutorial%23Plugintutorial-DebuggingaPlugin&usg=AFQjCNFnyh6EcntVf7DDGbHEaQ7xw2F71w

E.g. for Windows
> set MAVEN_OPTS=-Xdebug 
> -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n
> mvn hpi:run

Depending on if you want/need to capture the entire startup:
You will have to change suspend=n to suspend=y. That will put the
plugin on hold until you have connected to it else just use the
parameter as given. Start your Jenkins.

In Eclipse:

Debug configurations -> Remote Java Application -> RMB "New"
Connection Properties:
Host: the remote machine that runs Jenkins
Port: 8000 (if you use the exact phrase from above)

Save that settings for late use, hit debug and wait for Eclipse to
connect.

Take care
Jan



On 21 Apr., 03:43, Jesse Farinacci <jie...@gmail.com> wrote:
> Greetings,
>
> On Fri, Apr 20, 2012 at 9:23 PM, Albin Joy <4joyal...@gmail.com> wrote:
> > You are correct. I need to debug an existing plugin(GerritTrigger) to find
> > out the code flow.
>
> > Can u please give me an example, how I can specify the defailed information
> > about this plug-in for debugging?
>
> You're better off checking the code out from source, then running it
> via mvnDebug. You can find the plugin source code 
> here:https://github.com/jenkinsci/gerrit-trigger-plugin
>
> -Jesse
>
> --
> There are 10 types of people in this world, those
> that can read binary and those that can not.

Reply via email to