Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Commit

Permalink
Enable conditional breakpoint support.
Browse files Browse the repository at this point in the history
  • Loading branch information
seraku24 authored and rebornix committed Apr 17, 2017
1 parent df28654 commit 6c7311d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ class RubyDebugSession extends DebugSession {
// This debug adapter implements the configurationDoneRequest.
response.body.supportsConfigurationDoneRequest = true;
//response.body.supportsFunctionBreakpoints = true;
//currently cond bp doesn't work - but that doesn't really matter, because neither does this call
response.body.supportsConditionalBreakpoints = false;
response.body.supportsConditionalBreakpoints = true;
this.sendResponse(response);
}

Expand Down Expand Up @@ -157,9 +156,8 @@ class RubyDebugSession extends DebugSession {
Promise.all(deletePromises).then(() => this._breakPoints.delete(path));
}
var breakpointAddPromises = args.breakpoints.map(b=>{
//let conditionString = b.condition ? ' if ' + b.condition : '';
//return this.rubyProcess.Enqueue('break ' + path + ':' + b.line + conditionString);
return this.rubyProcess.Enqueue('break ' + path + ':' + b.line);
let conditionString = b.condition ? ' if ' + b.condition : '';
return this.rubyProcess.Enqueue('break ' + path + ':' + b.line + conditionString);
});
Promise.all(breakpointAddPromises).then( values => {
let breakpoints = values.map(attributes => {
Expand Down

0 comments on commit 6c7311d

Please sign in to comment.