在服务器上设置远程debug

nohup java -jar -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=debug端口号 xxxx.jar > xxxx.log 2>&1 &

在idea设置

远程debug_端口号

注意事项:

  • 阿里云需配置远程debug的端口安全组
  • 若服务器防火墙开启了,需放行端口或关闭防火墙