Hi,
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.
Hi, i have tried it, but it is not working ..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much! :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
When JIRA starts after you ran atlas-debug, in Eclipse go to Run -> Debug Configurations. There should be an option "Remote Java Application" - rightclick and create new. Set the port for 5005 and start debugging.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1. I run the command: atlas-debug
[INFO] jira started successfully in 29s at http://localhost:2990/
2. Then debug
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As I already said in my answer - set the port to 5005.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also, when ı tried http://localhost:5005/, I am getting the following error:
[INFO] [talledLocalContainer] Debugger failed to attach: handshake failed - received >GET /cargocpc/< - excepted >JDWP-Handshake<
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Bahar,
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.
Thank
Harry
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Andris. Nice, simple and easy. Worked out-of-the-box. +1 :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you ...its working for me
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Andris, this works like a charm!
This is a game changer for me XD
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I just used the IDEA IDE and it works :)
Maybe there is a error in eclipse.
Best regards,
Andi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have got the same problem. The port 5005 is selected but I get the same error. Also I can't access localhost:5005 through my webbrowser.
Any ideas?
Best Regards,
Andi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The debug options changed in JVM 5.0, and it appears from an examination of the command that they are issuing old debug options:
-Xdebug -Xrunjdwp:transport=dt_socket,address=5005,suspend=n,server=y
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.
See:
http://stackoverflow.com/a/173447/2363935
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@jayashree: have you attached the jira bar chart plugin code to the debug configuration.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i am still facing the issue. i have attached the screenshot. Can anyone please help me out ? Even when i configure it to 5005, on atlas-debug the application starts at 2990. I am not able to debug the plugin properly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i am still facing the issue. i have attached the screenshot. Can anyone please help me out ? Even when i configure it to 5005, on atlas-debug the application starts at 2990. I am not able to debug the plugin properly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
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?
|
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please read the following instructions to diagnose yourself what may be wrong: https://answers.atlassian.com/questions/208296/debugging-jira-and-confluence-plug-ins-via-eclipse?page=1#214145
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am still facing the issue. It says connection time out
. I have eclipse and jira in the same machine. I configured the eclipse as
Run -> Debug Configurations
Then selected the "Remote Java Appilcation". and configured as given in screenshot.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please read the following instructions to diagnose by yourself what may be wrong:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.