dap: Replace breakpoint when changed event comes through
This commit is contained in:
parent
85b4410703
commit
72576822f3
1 changed files with 14 additions and 13 deletions
|
@ -397,19 +397,20 @@ impl Application {
|
||||||
.position(|b| b.id == breakpoint.id)
|
.position(|b| b.id == breakpoint.id)
|
||||||
{
|
{
|
||||||
Some(i) => {
|
Some(i) => {
|
||||||
let item = debugger.breakpoints.get_mut(i).unwrap();
|
debugger.breakpoints[i] = breakpoint;
|
||||||
item.verified = breakpoint.verified;
|
// let item = debugger.breakpoints.get_mut(i).unwrap();
|
||||||
// TODO: wasteful clones
|
// item.verified = breakpoint.verified;
|
||||||
item.message = breakpoint.message.or_else(|| item.message.clone());
|
// // TODO: wasteful clones
|
||||||
item.source = breakpoint.source.or_else(|| item.source.clone());
|
// item.message = breakpoint.message.or_else(|| item.message.clone());
|
||||||
item.line = breakpoint.line.or(item.line);
|
// item.source = breakpoint.source.or_else(|| item.source.clone());
|
||||||
item.column = breakpoint.column.or(item.column);
|
// item.line = breakpoint.line.or(item.line);
|
||||||
item.end_line = breakpoint.end_line.or(item.end_line);
|
// item.column = breakpoint.column.or(item.column);
|
||||||
item.end_column = breakpoint.end_column.or(item.end_column);
|
// item.end_line = breakpoint.end_line.or(item.end_line);
|
||||||
item.instruction_reference = breakpoint
|
// item.end_column = breakpoint.end_column.or(item.end_column);
|
||||||
.instruction_reference
|
// item.instruction_reference = breakpoint
|
||||||
.or_else(|| item.instruction_reference.clone());
|
// .instruction_reference
|
||||||
item.offset = breakpoint.offset.or(item.offset);
|
// .or_else(|| item.instruction_reference.clone());
|
||||||
|
// item.offset = breakpoint.offset.or(item.offset);
|
||||||
}
|
}
|
||||||
None => {
|
None => {
|
||||||
warn!("Changed breakpoint with id {:?} not found", breakpoint.id);
|
warn!("Changed breakpoint with id {:?} not found", breakpoint.id);
|
||||||
|
|
Loading…
Add table
Reference in a new issue