It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Eclipse Debugging Plugin JIRA 4.2

I already set up my development environment but i am unable to debug my plugins and use the Eclipse breakpoints. I have followed this process.

1. Stop using JIRA as a service.
2. Setting the correct environment variables. (I included the bat file provided on this forums.)
3. Start Tomcat using Debug Mode(See Image)
4. Create a Debug Configuration in Eclipse to point to Remote Server PORT.
5. I got the error message: Failed to connect to remote VM. Connection refused. Connection refused: connect

May be I am doing something wrong.

  • But how eclipse moves the JAR Plugin to the JIRA Installed Plugins Folder (Do i need to do something else in Eclipse?)
  • Do I have to use atlas-debug with this approach(I'm using a JIRA standalone installation so I think i don't have to start the bundled tomcat)
  • I have tested the plugin and it works perfectly.(No debugging yet)
  • Environment(JIRA 4.2,Plugin-sdk-3.2.3, Eclipse Helios J2EE, Windows XP)

Thank you.

4 answers

1 accepted

0 votes
Answer accepted


I'm curious if you ever got this running. Did you? I'm in the process of updating the documentation regarding JIRA debug sessions. This is what I've discovered:

  • you should start the plugin project with atlas-debug so that it opens the debug port
  • the default debug port is 5005 you can change this with a command parameter



It got resolved but never got the emails untils now.


Answering the question about 'how it works', when you initiate a debug connection to Jira from Eclipse, Eclipse intercepts requests by the Jira VM for classes and lets you use Eclipse to step through their execution (for example, get the Jira Source zip, and add to your 'source' path, it may take a while, but atlassian code will be magically found, allowing you to see whats going on). Because of this interception, no jars need to be moved/copied. Things get a little confused sometimes when you do hot code edits during a debug run, sometimes the call stack unwinds to a previous level, allow a repeat execution, sometimes thing get 'out of sync' and debugging session needs to be restarted, or even have jira restarted as well.

The screenshot you show is indicating its listening on 8000, are you connecting to localhost on the same machine in the Eclipse Remote Debug Target?

I have a bunch of Jira debug sessions at the moment, and all use the following syntax:

JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000"

Im not sure what Atlassian have done to break down 'simplify' the settings but this should work:

SET JAVA_OPTS="%JAVA_OPTS% -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000"

Try using 'telnet 8000' at a command prompt and see if it connects. If not, perhaps you have a software firewall in the way? check firewall logs?

Are you using a customized jira startup.bat. I have started my instance from cmd using the arguments you provided. But when i did the telnet localhost 8000 i did the following message.

Debugger failed to attach: timeout during handshake

When eclipse fails when attaching the debugger.

Could you provide your settings to enable debugging?

Can you show us your eclipse configuration to ensure it is set to connect on port 8000?

Yes Indeed. I have created a Remote Debug Target using localhost and port 8000. But I do have the same error. I have started jira like this.

mystartup.bat -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000

Firewall is disabled since im using a vmware vm.

telnet from a cmd:

telnet localhost 8000.

Jira start up command prompt the following message.

Debugger failed to attach: timeout during handshake

So the tomcat is listening definitely, but for some reason eclipse cant attach the debugger.

Are you using a customized startup.bat or using the same jira installation one.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in United States

Live! - Austin ACE -- Summer BASH 2019

Hey Austin! Come join us for our 2019 Atlassian Community Summer BASH as we transition ourselves into party status! Bring an attachment, log a great time, and collaborate with new friends as we celeb...

9 views 0 0
View post

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you