dqr91899 2018-08-17 05:43
浏览 176

调试时如何在Visual Studio中查看Golang的全局变量?

While debugging Go using delve only the local variables are shown. I can't see all the global variables. Is there any settings change to see the list of all variablesenter image description here

Here a is not showing, even when I hover mouse over it its value is not coming.

  • 写回答

1条回答 默认 最新

  • dsf4354353452 2018-08-17 11:26
    关注

    Local variable tab will only display local variables as its name suggest it.

    But to me, the best thing you could do is to manually add the desired variable to your watch list. Just click on the "+" icon in the watch tab (left pannel) and chose the variable that you want to watch while debugging.

    Watch variable list

    Some more details are given in this answer

    评论

报告相同问题?