delve icon indicating copy to clipboard operation
delve copied to clipboard

Debugger stops at breakpoint in a loop only once (Windows Arm64)

Open sergunya opened this issue 3 years ago • 8 comments
trafficstars

1. dlv version

Delve Debugger
Version: 1.9.1
Build: $Id: d81b9fd12bfa603f3cf7a4bc842398bd61c42940 $

2. go version go version go1.19.3 windows/arm64

3. Operating system and processor architecture

Edition	       Windows 11 Pro
Version	       22H2
OS build	       22621.521
System type  64-bit operating system, ARM-based processor

6. Steps to reproduce

  • Install delve for Windows arm64 go install -tags exp.winarm64 github.com/go-delve/delve/cmd/dlv

  • Create sample.go file with the outlined below content `package main

    import ( "fmt" )

    func main() { length, capacity, y := 1000, 2000, 3 AllResults := make([]int, length, capacity) for i := 0; i < length; i++ { result := i / y // Hi there fmt.Println(result) AllResults[i] = result } j := 0 fmt.Println(j) }`

  • Start debug client: dlv debug sample.go

  • Add breakpoint inside loop: (dlv) break sample.go:12

  • Continue debug session (dlv) continue (debugger stops at breakpoint)

  • Continue debug session further (dlv) continue

7. Expected result The debugger stops at the breakpoint in every cycle in a loop.

8. Actual result The debugger stops at the breakpoint only in first cycle of the loop.

example

sergunya avatar Nov 07 '22 11:11 sergunya

cc @qmuntal

aarzilli avatar Nov 07 '22 11:11 aarzilli

Also step action doesn't work. Should I create a separate issue or we can continue with this ticket?

sergunya avatar Nov 07 '22 12:11 sergunya

I think it's fine to continue here.

aarzilli avatar Nov 07 '22 12:11 aarzilli

Thanks for reporting this issue. I'll investigate it next week.

qmuntal avatar Nov 09 '22 16:11 qmuntal

Which version of go are you using @sergunya? Can't reproduce this issue with go version go1.19.2 windows/arm64.

qmuntal avatar Nov 13 '22 14:11 qmuntal

@qmuntal hey, go version go1.19.3 windows/arm64

sergunya avatar Nov 14 '22 08:11 sergunya

I'm afraid I can't reproduce this locally. I do have an OS build slightly newer than yours (22621.819), but I doubt it matters here.

qmuntal avatar Nov 16 '22 08:11 qmuntal