參考下面這篇文章。web
總結下,比較簡單的辦法:tomcat
1.建立一個IDEA中的tomcat server---》remote server的調試intellij-idea
2.server頁設置IP和端口(web端口)app
3.Startup/connetction頁設置debug,並複製debug的語句socket
4.打開tomcat的catalina.sh,加入ide
CATALINA_OPTS="-agentlib:jdwp=transport=dt_socket,address=5005,suspend=n,server=y"idea
5.運行遠程的tomcat,並啓動本地調試.net