overstory / marklogic-intellij-plugin

Plugin to support XQuery + MarkLogic debugging in Intellij Idea
Apache License 2.0
12 stars 2 forks source link

Cleanup stopped requests on MarkLogic when a debug session is terminated #42

Closed ronhitchens closed 6 years ago

ronhitchens commented 7 years ago

Because MarkLogic requests run out-of-process in MarkLogic, separate from the IntelliJ process under control of the debugger, and because MarkLogic requests are suspended in MarkLogic indefinitely, it is possible for requests to be orphaned in MarkLogic if the debugging session is stopped before completing normally.

A similar issue arises wth captured appservers if the session is killed before the timeout period elapses in the IntelliJ process.

Need to add a post-execution cleanup step to terminate any suspended requests on the appserver, and to release the captured appserver if necessary. This is already done when a debug session starts and if it completes normally. But if a debug session terminates early (such as by clicking the square red Stop button in the debugger controls) then captured appservers or suspended requests can linger indefinitely. This hook needs to run in the main IntelliJ JVM process because the process under debugger control can be killed at any time without notice.

ronhitchens commented 6 years ago

This was addressed in version 0.9.1-beta.