I have started developing jira plugins using Eclipse enviroment.
I use atlas-run to check my plugin. But I want to debug my code with breakpoints.
I tried atlas-debug for this, but the breakpoints didint work.
How can I do this? Can anyone suggest something?
Thanks for answers
I've got a simple solution, and you can pick any port you want.
(Debugging on port 5005 didn't work for me either)
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:
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:
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
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.
I tried with port 5005, but it didnt work :( I am getting the same error.
Failed to connect to remote VM. Connection refused. Connection refused
Maybe, the port is wrong? I run it as http://bahar:2990/jira , for this host will be bahar, and port will be 5005 again, right? for this case, I am getting the same error.
The problem is eclipse?
localhost:2990 is for viewing jira instance through website, and 5005 port is the one used to attach the socket to listen on, so thesed two ports are separated.
That means when opening jira via web brower, use localhost:2990, when debugging your plugins, please use 5005 in the debug settings.
I am too facing the same problem as Andreas Hilmer when using eclipse. I have followed all the steps as mentioned. My JIRA app uses 2990 and for debug i used 5005. However after choosing debug configuration and selecting debug i get the error "Launching the application failed. Failed to connect to vm. Connection refused.
Can anyone please help me resolving this issue?
I could somehow set the debug running. But how do we debug a plugin with no main method in it. I did set some breakpoints but i wasnt able to debug the application properly. Whereever i set the breakpoints the debug seems to be not hitting the code. Any help? I downloaded the code of JIRA Bar chart plugin.
This may be nothing, but I found that I couldn't connect to port 5005 via Eclipse (got connection refused error). Originally I started JIRA just by typing 'atlas-debug', but then when I tried atlas-debug --product jira --version 6.1 I could then get Eclipse to work.
The debug options changed in JVM 5.0, and it appears from an examination of the command that they are issuing old debug options:
I'm using Java 8 and simply get connection refused. I telnet and verify there is nothing listening on 5005. It seems that atlas-debug needs to be updated, that or tomcat's catalina.sh.
I checked the catalina.sh options in the build directory, and they are correct. It appears that atlas-debug must be building the command line and not allowing the catalina.sh to form the proper jdwp arguments
Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...
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!
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