IDebugTarget[] debugTargets = launch.getDebugTargets();
if (debugTargets != null) {
for (int i = 0; i < debugTargets.length; i++) {
IDebugTarget iDebugTarget = debugTargets[i];
try {
iDebugTarget.disconnect();
} catch (DebugException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}