简体   繁体   中英

How do I “print” the value of objects to the console with Go's Delve and Visual Studio Code?

I have the "Delve" debugger setup for Go with Visual Studio code and a super simple program. If I set a breakpoint, and I want to print a variable declared earlier, I'm used to being able to say po foo to print out the value of the object foo to the console, but Visual Studio Code just complains about "expected 'EOF'".

How do I print? If I wanted to test things out by printing out values, does Delve not support that?

在调试控制台中,输入foo (不带po前缀)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM