IDEA: ShutdownHook does not work in windows on Ctrl-F2


#1

In windows when i stop Intellij debugging by Ctrl-F2, registered shutdown hook does not works:
Runtime.getRuntime().addShutdownHook(object : Thread() {
override fun run() { log.info(“program stopped”) }
})

In windows console when stopping by Ctrl-C hook works good

In linux everything works good in both cases.

Any help?


#2

Please ask IntelliJ IDEA related questions in the IntelliJ IDEA forum. Thanks.


#3

ok, thank you and sorry