delve
delve copied to clipboard
Function calls are not supported on conditional breakpoints
-
What version of Delve are you using (
dlv version
)? Delve Debugger Version: 1.3.2 Build: 3c266810757cd4abafe46fc6c9203aeeef5e15bf -
What version of Go are you using? (
go version
)? Go 1.13.4 -
What operating system and processor architecture are you using? windows/amd64
-
What did you do? Run the following app in debug mode:
package main
import (
"fmt"
"runtime"
)
func factorial(n int, withBreak bool) int {
if withBreak {
runtime.Breakpoint()
}
if n == 0 {
return 1
} else {
return n * factorial(n-1, withBreak)
}
}
func main() {
factorial(10, false)
fmt.Println("the end")
}
Then run the following commands in delve:
b main.go:16
cond 1 factorial(n, false) == 6
c
-
What did you expect to see? I'd expect the execution to stop at the breakpoint when the condition is met.
-
What did you see instead?
Command failed: error evaluating expression: function calls not allowed without using 'call'
+1 Just confirming.. Isn't it possible to invoke functions while in a debug session?
Is there a plan for this issue yet?