Using an interactive debugger is definitely one of them, as is building and using reproducible local dev environments.