Eclipce remote debugging

 1. Note:

  root permission to start the process does not support remote debugging, there are many hidden dangers, support the highest authority, the application of the average user to start, and originally installed Tomcat is the root privileges to use, ordinary users do not have permission for the software root installation, you can modify the appropriate permissions, but there are also some ramifications, and therefore create a normal user to install and start.

2. Create a regular user to install and start Tomcat:

  New User (adduser user name), given the password (passwd user name), turning off the root of the Tomcat start, switch user (su user name), the new upload Tomcat decompression start, pay attention to modify the configuration information [ordinary user to modify the start port can not be less than 1000 to avoid an error, a request may be used to configure port guide 80 8080].

  iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --toport 8080 (a request for port guide 80 8080);

  service iptables save (save changes);

  systemctl restart iptables.service (restart the service);

  systemctl enable iptables.service (let the service take effect)

3.catalina.sh:

  It will automatically call catalina.sh (mainly call related information of the virtual machine) when calling startup.sh.

  Modify the virtual machine to Debug (catalina.sh file): CATALINA_OPTS = "- Xdebug -Xrunjdwp: transport = dt_socket, address = 9100, server = y, suspend = n", which represents the start Xdebug debugging, -Xrunjdwp represents the execution start jdwp example, transport represents transmission of communication data between processes, dt_socket represented socket used, address server is listening on the port debugging, server indicating whether the server is running as a debugger, suspend indicates whether to end commissioning customer after establishing a connection start JVM.

     

   After the modification restart tomcat.

4.Eclipce remote connections

  Select the drop-down insects 4.1 Configuration Debug configuration:

 

  4.2 pairs Remote Java Application settings:

  After 4.3 can be remotely debug

Guess you like

Origin www.cnblogs.com/lyq-biu/p/10958636.html