Function calls are not supported on conditional breakpoints
Author: dlsniperCreated Nov 22, 2019Updated Sep 8, 2026
Labelsarea/prockind/enhancement
What version of Delve are you using (
dlv version)? Delve Debugger Version: 1.3.2 Build: 3c266810757cd4abafe46fc6c9203aeeef5e15bfWhat version of Go are you using? (
go version)? Go 1.13.4What 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
cWhat 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'Source: go-delve/delve