Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

Function calls via delve 'call' are not supported #2655

Closed
@goonode

Description

@goonode

Issue type: feature request

vscode-go version: 0.11.4

delve version:
Delve Debugger
Version: 1.2.0
Build: df65be43aeb1b0f64c042827e6ccd6c91f91eed7

go version:
devel +b9edee32e1 Mon Jul 15 16:53:05 2019 +0000 linux/amd64

Delve has added the call command to be able to make function calls while in debug.

When I try to make a function call there are eval messages in the following ways using a simple code:
package main

import "fmt"
func MyF() {
fmt.Println("Test")
}
func main() {
MyF()
}

  1. i try to make a function call without the delve 'call' command and the eval output is as follow:

API server listening at: 127.0.0.1:38730
MyF()

Unable to eval expression: "function calls not allowed without using 'call'"
Failed to eval expression: {
"Expr": "MyF()",
"Scope": {
"goroutineID": 1,
"frame": 0
},
"Cfg": {
"followPointers": true,
"maxVariableRecurse": 5,
"maxStringLen": 1024,
"maxArrayValues": 64,
"maxStructFields": -1
}
}

Eval error: function calls not allowed without using 'call'

  1. The same but using the delve 'call' command give me:
    call MyF()

Unable to eval expression: "1:6: expected 'EOF', found MyF"
Failed to eval expression: {
"Expr": "call MyF()",
"Scope": {
"goroutineID": 1,
"frame": 0
},
"Cfg": {
"followPointers": true,
"maxVariableRecurse": 5,
"maxStringLen": 1024,
"maxArrayValues": 64,
"maxStructFields": -1
}
}

Eval error: 1:6: expected 'EOF', found MyF

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions