Made pausing the program possible! 🎉

This commit is contained in:
WebFreak001 2016-02-04 16:00:17 +01:00
commit be89778b3b
2 changed files with 8 additions and 3 deletions

View file

@ -18,9 +18,11 @@ Now you need to change `target` to the application you want to debug relative
to the cwd. (Which is the workspace root by default)
Before debugging you need to compile your application first, then you can run it using
the green start button in the debug sidebar. Multithreading and adding breakpoints
while running does not work at the time of writing. However you can add/remove breakpoints
as you wish while the program is paused.
the green start button in the debug sidebar. For this you could use the `preLaunchTask`
argument vscode allows you to do. Debugging multithreaded applications is currently not
implemented. Adding breakpoints while the program runs will not interrupt it immediately.
For that you need to pause & resume the program once first. However adding breakpoints
while its paused works as expected.
Extending variables is very limited as it does not support child values of variables.
Watching expressions works partially but the result does not get properly parsed and

View file

@ -15,6 +15,7 @@ export class MI2 extends EventEmitter implements IBackend {
this.process.stderr.on("data", this.stdout.bind(this));
this.process.on("exit", (() => { this.emit("quit"); }).bind(this));
Promise.all([
this.sendCommand("gdb-set target-async on"),
this.sendCommand("environment-directory \"" + cwd + "\"")
]).then(resolve, reject);
});
@ -31,6 +32,7 @@ export class MI2 extends EventEmitter implements IBackend {
this.process.stderr.on("data", this.stdout.bind(this));
this.process.on("exit", (() => { this.emit("quit"); }).bind(this));
Promise.all([
this.sendCommand("gdb-set target-async on"),
this.sendCommand("environment-directory \"" + cwd + "\"")
]).then(resolve, reject);
});
@ -48,6 +50,7 @@ export class MI2 extends EventEmitter implements IBackend {
this.process.stderr.on("data", this.stdout.bind(this));
this.process.on("exit", (() => { this.emit("quit"); }).bind(this));
Promise.all([
this.sendCommand("gdb-set target-async on"),
this.sendCommand("environment-directory \"" + cwd + "\""),
this.sendCommand("target-select remote " + target)
]).then(resolve, reject);