Added support for program arguments (fix #27)
This commit is contained in:
parent
0d8ae8d7bb
commit
cb9e36d6db
4 changed files with 21 additions and 10 deletions
|
|
@ -13,6 +13,7 @@ let relative = posix.relative;
|
|||
export interface LaunchRequestArguments {
|
||||
cwd: string;
|
||||
target: string;
|
||||
arguments: string;
|
||||
autorun: string[];
|
||||
ssh: SSHArguments;
|
||||
printCalls: boolean;
|
||||
|
|
@ -109,7 +110,7 @@ class MI2DebugSession extends DebugSession {
|
|||
this.isSSH = true;
|
||||
this.trimCWD = args.cwd.replace(/\\/g, "/");
|
||||
this.switchCWD = args.ssh.cwd;
|
||||
this.gdbDebugger.ssh(args.ssh, args.ssh.cwd, args.target).then(() => {
|
||||
this.gdbDebugger.ssh(args.ssh, args.ssh.cwd, args.target, args.arguments).then(() => {
|
||||
if (args.autorun)
|
||||
args.autorun.forEach(command => {
|
||||
this.gdbDebugger.sendUserInput(command);
|
||||
|
|
@ -120,7 +121,7 @@ class MI2DebugSession extends DebugSession {
|
|||
});
|
||||
}
|
||||
else {
|
||||
this.gdbDebugger.load(args.cwd, args.target).then(() => {
|
||||
this.gdbDebugger.load(args.cwd, args.target, args.arguments).then(() => {
|
||||
if (args.autorun)
|
||||
args.autorun.forEach(command => {
|
||||
this.gdbDebugger.sendUserInput(command);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue