Skip to content

Commit 0cdcddd

Browse files
authored
Exit debugger session when Error is occurred in child process (#99)
1 parent e324ab1 commit 0cdcddd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/extension.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,9 @@ class RdbgAdapterDescriptorFactory implements DebugAdapterDescriptorFactory {
756756
debugProcess.stderr.on('data', (chunk) => {
757757
const msg: string = chunk.toString();
758758
stderr += msg;
759+
if (stderr.includes('Error')) {
760+
reject(new Error(stderr));
761+
}
759762
if (stderr.includes('DEBUGGER: wait for debugger connection...')) {
760763
connectionReady = true;
761764
}
@@ -795,6 +798,9 @@ class RdbgAdapterDescriptorFactory implements DebugAdapterDescriptorFactory {
795798
debugProcess.stderr.on('data', (chunk) => {
796799
const msg: string = chunk.toString();
797800
stderr += msg;
801+
if (stderr.includes('Error')) {
802+
reject(new Error(stderr));
803+
}
798804
if (stderr.includes('DEBUGGER: wait for debugger connection...')) {
799805
connectionReady = true;
800806
}

0 commit comments

Comments
 (0)