Catch the running mode in Java - Running mode or Debug mode
boolean isDebug = java.lang.management.ManagementFactory.getRuntimeMXBean(). getInputArguments().toString().indexOf("-agentlib:jdwp") > 0; LOGGER.info("hihhhhhhhhhhhhhhhhhh" + isDebug);