Remote debug confluence with eclipse

Hi,

i added the following confliguration in my setenv.sh =>

-Xdebug -agentlib:jdwp=transport=dt_socket,address=1043,server=y,suspend=n

i see in my logs the following line =>

Listening for transport dt_socket at address: 1043

So I suppose that I normally can connect on the port 1043 with my eclipse, but i doesnt work...

I have no probleme to remote debug on a windows server, but hier it's a linux and it fail...

What's the difference? and what I'm missing?

Thanks.

François


1 answer

1 accepted

This widget could not be displayed.

François, have a try in it!

 

Step 1 - Edit catalina.bat:

Go to your atlassian-jira-x.x.x-standalone/bin and open catalina.bat in an editor.

Find the following chunk of code:

 

1
2
3
4
5
6
rem set _EXECJAVA=%_RUNJAVA%
rem set MAINCLASS=org.apache.catalina.startup.Bootstrap
rem set ACTION=start
rem set SECURITY_POLICY_FILE=
rem set DEBUG_OPTS=
rem set JPDA=

 

 

and replace it with:

 

1
2
3
4
5
6
set _EXECJAVA=%_RUNJAVA%
set MAINCLASS=org.apache.catalina.startup.Bootstrap
set ACTION=start
set SECURITY_POLICY_FILE=
set DEBUG_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=7456,server=y,suspend=n
set JPDA=

 

 

Notice that address=7456 means that this port will be available for debugging. You can use any other port you want.

 

Step 2 - Add external run configuration in Eclipse

  • Go to Run -> Debug Configurations...
  • Create a new Remote Java Application run configuration: (right click Remote Java Application -> New)
  • Make sure your Project: option is set to your Jira plugin project.
  • Set your Connection Type: to Standard (Socket Attach).
  • Under Connection Properties, put in your host (in my case localhost ), then specify your port. (in my case 7456)

 

Now you have your debugging mechanism all set up. After you start jira, just run this debugging configuration (Debug As -> Debug Configurations -> Your configuration) and place your breakpoints wherever you need them.

 

Cheers

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 17, 2018 in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

542 views 7 6
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you