Code for checking that debug finished has been added. The function tryHandleDebugFinished in GHCiDebugProcess
 do the check and on success calls method stop for current session