I am using vscode to build my golang gin project.
I go to debugging mod and can not do evaluate expressions.
I want to go some line and evaluate that see what happened in that monent.
Like eclipse ctrl+shift+i or idea ctrl+alt+f8
Quick evaluate expression.
I also see this
Eclipse inspection (Ctrl + Shift + I) equivalent in IntelliJ IDEA (Community Edition)
Watch window or evaluate expressions while debugging in VS Code?
func main() {
router := gin.Default()
router.GET("/user/:name", func(c *gin.Context) {
name := c.Param("name")
c.String(http.StatusOK, name, 1, 2, 3, 4)
})
when the debugger line in name := c.Param("name")
I try to use the bottom of vscode window and when I type this code into the command it will return
but if I type name it will return the right string for me.
Failed to eval expression: { "Expr": "c.Param(\"name\")",
"Scope": {
"goroutineID": 34,
"frame": 1 },
"Cfg": {
"followPointers": true,
"maxVariableRecurse": 1,
"maxStringLen": 64,
"maxArrayValues": 64,
"maxStructFields": -1 } }
Eval error: function calls not allowed without using 'call'