Intellij: Build to Remote

Answered

I need to debug a java app on a remove Linux box.  I'm also new to Remote Debugging, so I'm still figuring out some of the issues.

Is there a way to have IntelliJ build java app (.jar) and automatically push to the remove server for debugging or just plain execution.

I have opened up a SFTP port into the server and have the debugging port already established.

I'm just trying to avoid the hassel of scp'ing the file over every time I want to test it.  Is there a way to simplify the process?

Thanks.

2
1 comment

You can build the jar artifact for the project and upload it using sftp deployment to the remote server (auto-upload of modified files is supported). Then create Remote Run/Debug Configuration for IDE debugging, copy the jvm options from it and start the java process on the remote server using these options, then attach to this process using IDEA Remote Run/Debug Configuration (see e.g. https://stackoverflow.com/questions/975271/remote-debugging-a-java-application https://stackoverflow.com/questions/21114066/attach-intellij-idea-debugger-to-a-running-java-process about remote debug).

1

Please sign in to leave a comment.