Skip to content

Commit

Permalink
Add handle step over
Browse files Browse the repository at this point in the history
  • Loading branch information
inancgumus committed Dec 5, 2024
1 parent a883bbb commit 1b70aa0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions browser/breakpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ type breakpointUpdateResumer interface {
update(breakpoints []breakpoint)
vars() []map[string]debugVarFunc
resume(stepOut bool)
setStepOverMode(on bool)
}

type breakpointClient struct {
Expand Down Expand Up @@ -270,6 +271,8 @@ func (bc *breakpointClient) listen() {
bc.updateBreakpoints(envelope.Data)
case "resume":
bc.handleResume()
case "step_over":
bc.registry.setStepOverMode(true)
default:
log.Printf("breakpointClient: unknown command: %s", envelope.Command)
}
Expand Down
6 changes: 6 additions & 0 deletions browser/breakpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ func (bpt *breakpointTest) vars() []map[string]debugVarFunc {
return nil // TODO interface pollution
}

func (bpt *breakpointTest) setStepOverMode(on bool) {
bpt.mu.Lock()
defer bpt.mu.Unlock()
_ = on
}

func (bpt *breakpointTest) all() []breakpoint {
bpt.mu.Lock()
defer bpt.mu.Unlock()
Expand Down

0 comments on commit 1b70aa0

Please sign in to comment.