Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.
Merged
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 @@ -290,6 +290,11 @@
"type": "string",
"description": "If `rdebug-ide` is not in your path, provide the absolute path to `rdebug-ide` (eg. \"c:\\ruby\\rdebug-ide.bat\" )",
"default": "rdebug-ide"
},
"debuggerPort": {
"type": "string",
"description": "If you want to run more than one debugger, you can specify the port here.",
"default": "1234"
}
}
},
Expand Down
6 changes: 5 additions & 1 deletion src/ruby.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ export class RubyProcess extends EventEmitter {
runtimeArgs.push('-x');
}

if (args.debuggerPort && args.debuggerPort !== '1234'){
runtimeArgs.push(`-p ${args.debuggerPort}`);
}

if (args.stopOnEntry){
runtimeArgs.push('--stop');
}
Expand All @@ -218,7 +222,7 @@ export class RubyProcess extends EventEmitter {

this.debugprocess.stderr.on('data', (data: Buffer) => {
if (/^Fast Debugger/.test(data.toString())) {
this.debugSocketClient.connect(1234);
this.debugSocketClient.connect(args.debuggerPort || '1234');
if (args.showDebuggerOutput) {
this.emit('debuggerOutput', data);
}
Expand Down