1、idea设置
1.1 加入Tomcat Server选择Remote
1.2:设置对应的參数
xxx.xxx.152.67:8080为远程Tomcatserver的IP地址和port,这里能够设置域名。比如:http://security.xxxx.cn/login.do;
60222这个port为1.1步中设置的debugport。适合tomcat的port不一样的;
这里的Remote staging选择的都是same file system,这就要求本地代码和远程Tomcat的代码要一直;1
1.3 Startup/Connection
选择Debug、Socket、调试port这里是60222
1.4:选择执行
然后点击右边的debug就可以执行(首先Tomcat要启动)
1.5:是否成功
能够看到已经连接成功,
查看Tomcatserver日志。例如以下:
6、假设失败
假设出现port被拒绝:
这样的可能是tomcat并