How to open remote debug ports for Windows JIRA standalone

Dastin_Kuwałek__SoftwarePlant_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 4, 2017

Hi

I need to open debug ports for a standalone JIRA (installed without using atlassian-sdk)

I have tried adding JVM Arguments in my setenv.bat file like this:

set JVM_SUPPORT_RECOMMENDED_ARGS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=7456

But after starting JIRA and trying to debug from IntelIJ Idea I get a

 

java.net.ConnectException "Connection refused: connect

I can't open any of atlassian answers questions when I Goolge it, because today it was migrated to community.atlassian 

Thanks in advance!

2 answers

1 accepted

7 votes
Answer accepted
Dastin_Kuwałek__SoftwarePlant_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 4, 2017

After some time and digging, I have figured out a way to do this.

  1. I have replaced line set DEBUG_OPTS= with set DEBUG_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000 in my catalina.bat file located in JIRA installation directory
  2. To my setenv.bat file I have added a new JVM parameter, so now I have line:  set JVM_SUPPORT_RECOMMENDED_ARGS=-Xdebug

After configuring a Remote in IntelliJ idea I am, once again, a happy developer =) 

successful debug.png

1 vote

To make sure you are able to debug JIRA you can use Java debugger aka jdb by executing:

jdb -attach localhost:8000

 As a result, you should see something like this:

brother@brother:~$ jdb -attach localhost:34347
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.Throwable
Initializing jdb ...
>

Suggest an answer

Log in or Sign up to answer