Intellij IDEA remotely debugs java console program

I have a remote server with Java, to which I have SSH access. I am writing an application on a local machine building it with maven. Is it possible to install the Itellij IDEA IDE to run my project remotely? The idea is this: build a jar, copy it to the server and debug the process (or something like that).

It would be nice to share the settings that I need to configure.

+4
source share
2 answers

This is what I usually do to debug my remote application.

  • Start the server in debug mode

    It could be adding this particular line when starting your application server

    -Xdebug -Xrunjdwp:transport=dt_socket,server=n,suspend=n,address=9999
    

    JDK 1.4,

    -agentlib:jdwp=transport=dt_socket,server=n,suspend=n,address=9999
    

  • SSH

    100%, , ssh- (, , ;)). , , , .

    ssh -f user@personal-server.com -L 9999:personal-server.com:9999 -N
    
  • IDE

    , @SSJVegito, , 9999. , 9999. , : D   debug configuration

+9

Source: https://habr.com/ru/post/1585095/


All Articles