dpepbjp126917 2019-08-03 15:25
浏览 1128

在VS Code中调试时如何评估表达式?

enter image description hereI 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'

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥100 set_link_state
    • ¥15 虚幻5 UE美术毛发渲染
    • ¥15 CVRP 图论 物流运输优化
    • ¥15 Tableau online 嵌入ppt失败
    • ¥100 支付宝网页转账系统不识别账号
    • ¥15 基于单片机的靶位控制系统
    • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
    • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
    • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
    • ¥15 手机接入宽带网线,如何释放宽带全部速度