Debuggers are a great way to find out what is actually going on in your code. They allow you to pause, inspect and modify the state of your program at any time. This makes tracking down bugs, understanding the current behavior or identifying how certain things happen significantly easier than inserting things like print statements throughout your code (debuggers also allow you to change the state which isn’t possible in simple logs or outputs.
In this video we’re going to explore how you can debug Unity with VS Code. This will allow you to connect a debugger to Unity, set breakpoints (normal, conditional, or periodic breakpoints), setup variable watches to keep an eye on specific values and explore properties of the current stack like the call-stack and currently scoped variable values.
The Unity Debugger is open source and on GitHub here, check it out!: https://github.com/Unity-Technologies/vscode-unity-debug
The Debug Symbol from the thumbnail is part of the Modern UI Icons set by Austin Andrews: http://modernuiicons.com/
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u