8 ms·
How are you able to write code without being able to set breakpoints, stepping in a function, do mouse over to see the value of a variable? Do you print values
by hi41 8y ago
How are you able to write code without being able to set breakpoints, stepping in a function, do mouse over to see the value of a variable? Do you print values of variables when you need to?
- sdenton4 8y agoIt helps to write small functions with good interfaces and plenty of tests... The better your fundamentals, the less you need the debugger. (But, also, there's gdb and delve for debugging. So, do what ya wanna.)
- dana321 8y agoMany people write code fine without a debugger. Break your software down into smaller components and write tests for each of them.
- coder543 8y agoI personally almost never use a debugger with Go (or Rust), but it looks like you can get all of that functionality with VS Code using Delve: https://github.com/Microsoft/vscode-go/wiki/Debugging-Go-code-using-VS-Code https://github.com/Microsoft/vscode-go/wiki/Debugging-Go-cod... I found a video of someone debugging Go code in VS Code, and I saw them set breakpoints, step around in a function, and hover over a variable to see its value, in addition to the sidebar containing all of the values of all of the local variables and the stack traces.
- AsyncAwait 8y agoHuh? https://github.com/derekparker/delve https://github.com/derekparker/delve integrates nicely with many editors, including [1] and [2] and allows you to do exactly that. 1 - https://www.jetbrains.com/go https://www.jetbrains.com/go 2 - https://github.com/Microsoft/vscode-go https://github.com/Microsoft/vscode-go