IDEA启动Springboot项目卡死
情况描述:一次调试SpringBoot项目时,dubug启动,启动到一半时卡死不动
解决思路
- 排除代码问题,重新clean,编译,问题依然在
- 重启IDEA,问题依然在
- 非debug启动,成功
问题定位:肯定和debug方式启动有关,并且在启动时下方弹出Method breakpoints may dramatically slow down debugging(方法断点可能会大大降低调试速度)
解决方法一:
项目根目录下找到.idea,在找到workspace.xml文件,打开后里面记录了项目【断点】记录,部分版本节点名有差异(总之就是带breakpoints字样的节点),如下:
<breakpoint-manager>
<breakpoints>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/ht-saas-wms-platform-server/src/main/java/com/hanthink/saas/wms/service/pd/impl/PdPassPartServiceImpl.java</url>
<line>42</line>
<option name="timeStamp" value="7" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-method">
<url>file://$PROJECT_DIR$/ht-saas-wms-platform-server/src/main/java/com/hanthink/saas/wms/service/pd/IPdPassPartService.java</url>
<line>18</line>
<properties class="com.hanthink.saas.wms.service.pd.IPdPassPartService" method="listPassPartLog">
<option name="EMULATED" value="true" />
</properties>
<option name="timeStamp" value="9" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
根据记录信息中路径信息找到对应文件,果然发现了一些奇葩断点,删除后重新debug启动,成功!!!
解决方法二
重新debug启动,问题解决!!!
实践测试
问题解决后,为了刨根问底,在各类文件中打断点测试,发现在接口类中打断点会导致该问题