3 ms·
Comment out all but the first and output the result. If it's what you expected, uncomment next line and output the result. Is it what you expected. Repeat...
by iampherocity 10y ago
Comment out all but the first and output the result. If it's what you expected, uncomment next line and output the result. Is it what you expected. Repeat... Debugging is just a specialized form of troubleshooting so the same rules apply. Bring the system to a known good, and increase until you find where it breaks.
- banachtarski 10y agoYou have a ton of these types of statements. Which one do you apply the treatment too? Your approach only allows doing this troubleshooting approach to a single place at a time easily.
- marcosdumay 10y agoHow do you debug several places at the same time? You have a ton of those statements, that's why you organize them in functions, and go debugging high level functions before you go into lower level ones, and then into atomic statements. Anyway, you'll almost certainly want to do that in an repl. I don't know if swift supports one, if not that would be a real drawback.
- iampherocity 10y agoThey do, it's really slick how well they have it integrated.