As a self-taught programmer, I learned to debug using an interactive console that kept all of my variables in memory when I build /run the script. However, I noticed the overwhelming trend for debugging in IDEs (and, I suppose CLI + Editor solutions, for that matter) is to build your script in one place and provide a separate console "sandbox" type area that only keeps variables if you copy/paste your code.
How do you debug without an interactive console? Can anyone list a few debugging steps that could help me be a better programmer / debugger?
Currently, this is a very simplified version of what I do:
- Write some pseudocode (sometimes)
- Write some code in an editor that should work
- run / build the script
- Check stdout for errors
- If no errors, then 7.
- If errors, then back to 2 after fixing the offending code.
- Type variable names into console to verify that they look like I anticipated.
- Rinse and Repeat until it works as I intended.