From 1b70aa00f4ef1f9d96e63cd801b6d6785d3bd7fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0nan=C3=A7=20G=C3=BCm=C3=BC=C5=9F?= Date: Thu, 5 Dec 2024 16:16:30 -0500 Subject: [PATCH] Add handle step over --- browser/breakpoint.go | 3 +++ browser/breakpoint_test.go | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/browser/breakpoint.go b/browser/breakpoint.go index 29a43762d..b0a329680 100644 --- a/browser/breakpoint.go +++ b/browser/breakpoint.go @@ -208,6 +208,7 @@ type breakpointUpdateResumer interface { update(breakpoints []breakpoint) vars() []map[string]debugVarFunc resume(stepOut bool) + setStepOverMode(on bool) } type breakpointClient struct { @@ -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) } diff --git a/browser/breakpoint_test.go b/browser/breakpoint_test.go index 765498af2..b6f4fd99b 100644 --- a/browser/breakpoint_test.go +++ b/browser/breakpoint_test.go @@ -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()