Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,11 @@
"type": "boolean",
"description": "Show output of the debugger in the console.",
"default": false
},
"keepRubyProcessOnDisconnect": {
"type": "boolean",
"description": "Keep ruby process on disconnect request.",
"default": false
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/debugger/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ export interface AttachRequestArguments extends DebugProtocol.AttachRequestArgum
remoteWorkspaceRoot?: string;
/** Show debugger process output. If not specified, there will only be executable output */
showDebuggerOutput?: boolean;
/** Keep ruby process on disconnect request */
keepRubyProcessOnDisconnect?: boolean;
}

export interface IRubyEvaluationResult {
Expand Down
2 changes: 1 addition & 1 deletion src/debugger/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ class RubyDebugSession extends DebugSession {
}

protected disconnectRequest(response: DebugProtocol.DisconnectResponse, args: DebugProtocol.DisconnectArguments) {
if (this.rubyProcess.state !== SocketClientState.closed) {
if (!this.requestArguments.keepRubyProcessOnDisconnect && this.rubyProcess.state !== SocketClientState.closed) {
this.rubyProcess.Run('quit');
}
this.sendResponse(response);
Expand Down