Why would Tomcat servlet's ContextDestroyed not be called when running in debugger?

I am running IntelliJ version 14.1.3 build 141.1010 on a MacBook Pro.  I have a web app that the IDE deploys as an exploded war to a local instance of Tomcat that the IDE launches.

After launch contextListener.contextInitialized and everything else except the servlet's contextListener.contextDestroyed method is called as expected.  I've tried bringing down the server using both the debugger stop button and the Application Servers stop button but neither approach appears to differ in any way with regards to what steps are being taken during shutdown.   

What is the proper way to launch and terminate the Tomcat instance from within IntelliJ so that the server's contextDestroyed method is called and can be stepped through using the debugger?

Thanks
Mark

Please sign in to leave a comment.