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

Exception or error:

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?

How to solve:

In debug console type foo (without po prefix)

Leave a Reply

Your email address will not be published. Required fields are marked *