diff --git a/misc/debug-adapter/modules/debug-adapter-core/src/main/java/org/ballerinalang/debugadapter/JBallerinaDebugServer.java b/misc/debug-adapter/modules/debug-adapter-core/src/main/java/org/ballerinalang/debugadapter/JBallerinaDebugServer.java index 3ac8ab4189bc..3397088cb5f6 100755 --- a/misc/debug-adapter/modules/debug-adapter-core/src/main/java/org/ballerinalang/debugadapter/JBallerinaDebugServer.java +++ b/misc/debug-adapter/modules/debug-adapter-core/src/main/java/org/ballerinalang/debugadapter/JBallerinaDebugServer.java @@ -455,8 +455,9 @@ public CompletableFuture restart(RestartArguments args) { resetServer(); launchDebuggeeProgram(); return CompletableFuture.completedFuture(null); - } catch (Throwable e) { - outputLogger.sendErrorOutput("Failed to restart the ballerina program due to: " + e); + } catch (Exception e) { + LOGGER.error("Failed to restart the ballerina program due to: " + e.getMessage(), e); + outputLogger.sendErrorOutput("Failed to restart the ballerina program"); return CompletableFuture.completedFuture(null); } } @@ -668,7 +669,7 @@ void terminateDebugSession(boolean shouldTerminateDebuggee, boolean enableClient if (context.getLaunchedProcess().isPresent() && context.getLaunchedProcess().get().isAlive()) { killProcessWithDescendants(context.getLaunchedProcess().get()); } - // Destroys remote VM process, if `shouldTerminateDebuggee' flag is set. + // Destroys remote VM process, if 'shouldTerminateDebuggee' flag is set. if (shouldTerminateDebuggee) { terminateDebuggee(); }