Add valuesFormatting parameter to launch config

This commit is contained in:
gentoo90 2017-05-26 22:48:33 +03:00
commit beb80f7375
7 changed files with 201 additions and 43 deletions

View file

@ -1,6 +1,8 @@
import { MINode } from "./mi_parse";
import { DebugProtocol } from "vscode-debugprotocol/lib/debugProtocol";
export type ValuesFormattingMode = "disabled" | "parseText" | "prettyPrinters";
export interface Breakpoint {
file?: string;
line?: number;

View file

@ -196,9 +196,9 @@ export class MI2 extends EventEmitter implements IBackend {
];
if (!attach)
cmds.push(this.sendCommand("file-exec-and-symbols \"" + escape(target) + "\""));
if (this.prettyPrint)
cmds.push(this.sendCommand("enable-pretty-printing"));
// TODO: add extension parameter for enabling/disabling pretty printers
cmds.push(this.sendCommand("enable-pretty-printing"));
return cmds;
}
@ -668,7 +668,7 @@ export class MI2 extends EventEmitter implements IBackend {
return new VariableObject(res.result(""));
}
async varEvalExpression(name: string): Promise < MINode > {
async varEvalExpression(name: string): Promise<MINode> {
if (trace)
this.log("stderr", "varEvalExpression");
return this.sendCommand(`var-evaluate-expression ${name}`);
@ -746,6 +746,7 @@ export class MI2 extends EventEmitter implements IBackend {
return this.isSSH ? this.sshReady : !!this.process;
}
prettyPrint: boolean = true;
printCalls: boolean;
debugOutput: boolean;
public procEnv: any;