//Only close the console communication if the user actually cancelled (otherwise the user will expect it to still be working).
consoleCommunication.close();
debugger.dispose(); //Can't terminate the process either!
} else {
//But we still want to dispose of the connector.
debugger.disposeConnector();
}
} catch (Exception e) {
// Don't hide important information from user
Log.log(e);
}