Hello,
In order to debug Jira plugins in development, I use atlas-debug command.
This latter allows changing the debug port number with the option --jvm-debug-port. This expects an integer to be given.
Both the Jira instance in development and the debugger (IntelliJ) run on the same machine: localhost.
Therefore I would like to limit the connections to Jira instance JVM to the ones from localhost only.
I think that passing the following arguments to the JVM would implement that requirement: "-Xdebug -Xrunjdwp:transport=dt_socket,address=localhost:5005,server=y,suspend=n" .
Unfortunately I have found no way to pass these specific arguments. Tries have been made through
* setting environment variable MAVEN_DEBUG_OPTS,
* editing pom.xml configuration part,
* using mvnDebug command.
Does anyone have experience with this kind of issue?
Best regards,
Patrick
I don't understand, you try to debug your plugin locally and failed?
Do so, all you need is (as you done) run "atlas-debug".
Now from intellij, on the top right click "edit configuration" (near the play button) -> in the window open, click the plus icon on the top left -> drop dow"n appear, select "remote" -> in the right section of the window, set name (for example "local") and in "Host" make sure it set to "localhost" -> click "ok" to save.
Now once your plugin is running, add break point to your code where you want, and click the debug button in intellij (in the top right near the play button).
That's it.
Hi @Nir Haimov ,
> I don't understand, you try to debug your plugin locally and failed?
It didn't fail and worked well indeed ;-)
The drawback is that atlas-debug opens a port 5050 by default for debugging purpose and I would like to limit the incoming traffic to this port - for network security reasons.
This can be done with some specific parameter sent to the VM, which allows the localhost only to access the port 5050:
"-Xdebug -Xrunjdwp:transport=dt_socket,address=localhost:5005,server=y,suspend=n".
But I can't find a way to do this through atlas-debug command... With atlas-debug command it is possible to specify another port address (say 8000) but not the machine that can access it (say localhost).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Hi @Patrick David
I think that locally you can't change it, because "atlas-debug" will always overwrite your settings.
But what you are afraid of? you are working locally, if your network secured should be good enough.
If you still want to do it, you will have to run a local Jira instance not from your plugin directory.
select different directory and type:
atlas-run-standalone --product jira --version 7.3.7 --jvmargs "-Datlassian.mail.senddisabled=false -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"
you can change the Jira version and address or any other parameter as you like.
But to be able to debug your plugin, you will have to package every change and manually upload your plugin to the standalone local Jira instance you created
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Nir Haimov ,
> I think that locally you can't change it, because "atlas-debug" will always overwrite your settings.
Mmm... That's a pity ;-)
> If you still want to do it, you will have to run a local Jira instance not from your plugin directory
Thank you for the suggestion.
I might as well try to launch my development instance of Jira with Java JDK 9 where - by default - the traffic triggered in the debugging context is limited to localhost only.
Thank you and best regards,
Patrick
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.