Quantcast

How I can debug a plugin?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How I can debug a plugin?

joyalbin
Dear all,

I really interested to learn more about GerritTrigger plugin.

Please, somebody can tell me, How I can debug the plugin in MyEclipse

This can help me a lot...
Please somebody replay for me....

Thanks a lot in advance....
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How I can debug a plugin?

jieryn
Greetings,

On Fri, Apr 20, 2012 at 7:35 PM, Albin Joy <[hidden email]> wrote:
> Please, somebody can tell me, How I can debug the plugin in MyEclipse

https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial#Plugintutorial-DebuggingaPlugin

-Jesse

--
There are 10 types of people in this world, those
that can read binary and those that can not.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How I can debug a plugin?

joyalbin
Dear Jesse..

Thanks a lot for your replay..
I gone through the Link which you gave.

one doubt....
If my Jenkins setup is in a server and I am accessing in my local PC, I had seen only, how to set the port. Can you please tell me, how to set the IP of server in this case?

Thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How I can debug a plugin?

jieryn
Greetings,

On Fri, Apr 20, 2012 at 8:21 PM, Albin Joy <[hidden email]> wrote:
> Thanks a lot for your replay..
> I gone through the Link which you gave.
>
> one doubt....
> If my Jenkins setup is in a server and I am accessing in my local PC, I had
> seen only, how to set the port. Can you please tell me, how to set the IP of
> server in this case?

What you seem to be describing is not normal debug of a plugin, that
is, debugging a plugin which you are developing. If you're trying to
debug an installation which already exists in a proper way (i.e. not
mvn hpi:run), then you need to describe in more detail what
information you want to access, e.g. threads, storage, open files.

-Jesse

--
There are 10 types of people in this world, those
that can read binary and those that can not.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How I can debug a plugin?

joyalbin

Dear Jesse,

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?
 
Thanks..
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How I can debug a plugin?

jieryn
Greetings,

On Fri, Apr 20, 2012 at 9:23 PM, Albin Joy <[hidden email]> 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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How I can debug a plugin?

Jan Seidel-2
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 <[hidden email]> wrote:

> Greetings,
>
> On Fri, Apr 20, 2012 at 9:23 PM, Albin Joy <[hidden email]> 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.
Loading...