简体   繁体   中英

Why do breakpoints disappear in Spring Tools Suite (Eclipse)?

All breakpoints are removed from the debugger each time Maven > Update Project is executed from the project's context menu in Spring Tools Suite (version 4.12.1)? Is it possible to prevent this from happening?

[EDIT] Steps to reproduce:

  1. Using Spring Tools Suite, select File > New > Spring Starter Project
  2. Enter Name: test , Group: com.sample , Artifact: test , Package: com.sample .
  3. Hit the NEXT button and without modifying anything the FINISH button.
  4. Open the TestApplication.java class file in the editor and activate a breakpoint on SpringApplication.run(TestApplication.class, args);
  5. From the project's context menu, select Maven > Update Project or hit ALT+F5 and press the OK button.

Result: The previously selected break point disappears while I would expect it to remain activated.

While creating the steps to reproduce, I noticed the clean projects option in the Update Maven Project pop-up. When you unselected this option, the breakpoint stay activated on project update. I also noticed this option gets selected automatically next time you re-run the Maven command.

Being more or less a workaround, I expect skipping clean could result in strange and unexpected behaviour. Any suggestions about a better and more permanent solutions are more than welcome.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM