Accepted answer

this is unfortunately a know issue with the new spring-boot-devtools module (see we use this trick to kill the main thread so that we can replace it with a re-loadable version. so far i've not found a way to prevent the debug breakpoint from triggering.

for now, you can toggle the "suspend execution on uncaught exceptions" checkbox in java -> debug preferences to prevent it from happening.


my workaround in kotlin:

fun main(args: array<string>) {
  val app = springapplication(
  try {*args)
  } catch (e: exception) {

private fun preventnonnullexitcodeonsilentexitexception(e: exception) {
  if (e.tostring().contains("silentexitexception")) {"ignoring silent exit exception...")
  throw e


try to run devtools at scope runtime:



i had same issue while running spring boot project. i found try catch block used in main method.

remove the try catch block run the code. that error will not come again. like below:

public static void main(string[] args) {, args);



delete these to unknown exceptions & it won't break there: enter image description here

unfortunately, i haven't found a way for this to be permanent, but it should last till the next time you restart eclipse.


set this in your file to true.


also go sure that if you use a spring cloud config server, there is no propertie file that enables this.


my workaround:

public static void main(string[] args) {
    try {, args);
    } catch (throwable e) {
        if(e.getclass().getname().contains("silentexitexception")) {
            logger.debug("spring is restarting the main thread - see spring-boot-devtools");
        } else {
            logger.error("application crashed!", e);

it doesn't matter that we ignore the silentexitexception because the devtools are just restarting the instance with a silentexitexception which isn't very silent. this try block will silence it...

i had to use text matching on the class as the silentexitexception is private in silentexitexceptionhandler.

it doesn't solve your problem with the breakpoint...


as eclipse on debug mode already allows limited hotpatching, i find the reloader to be counterproductive most of the time and so i decided to disable it by:

system.setproperty("spring.devtools.restart.enabled", "false");


since that exception is thrown by the reloader, this also solves this issue. note that you'll have to use the system.setproperty method instead of setting it in


add the property as a vm argument:


enter image description here

that way you don't have to change your code, as it is the case when using:

system.setproperty("spring.devtools.restart.enabled", "false");

Related Query

More Query from same tag