diff --git a/package.json b/package.json index ed84202ea..c568f1c9b 100644 --- a/package.json +++ b/package.json @@ -402,6 +402,11 @@ "type": "string", "description": "If you want to run more than one debugger, you can specify the port here.", "default": "1234" + }, + "includes": { + "type": "array", + "description": "Additional paths to be added to Ruby's include path", + "default": [] } } }, diff --git a/src/debugger/ruby.ts b/src/debugger/ruby.ts index 73439a75a..45d4006b1 100644 --- a/src/debugger/ruby.ts +++ b/src/debugger/ruby.ts @@ -207,6 +207,13 @@ export class RubyProcess extends EventEmitter { runtimeExecutable = args.pathToBundler; } } + + if (args.includes){ + args.includes.forEach((path) => { + runtimeArgs.push('-I') + runtimeArgs.push(path) + }) + } // '--' forces process arguments (args.args) not to be swollowed by rdebug-ide this.debugprocess = childProcess.spawn(runtimeExecutable, [...runtimeArgs, '--', args.program, ...args.args || []], {cwd: processCwd, env: processEnv});