News for hackers. Stuff that matters.
Re:Ask HN: How do you debug your code? by sz4kerto on Tuesday March 29, 2016 @02:05PM (#11383468)
Uh, this might be true for simple programs, but please try and debug complex race conditions with console.logs. It doesn't work very well.
Re:Ask HN: How do you debug your code? by oxymoron on Tuesday March 29, 2016 @04:18PM (#11384532)
Debugging complex race conditions isn't necessarily easy using a debugger either, since halting the passage of time has a tendency to make them go away. Why limit your toolbox? Logging statements and debuggers are both useful methodologies for resolving problems, but in the end, it's as the GP says -- your success is going to depend a lot more on your conceptual understanding of the issue and the application than on the debugging technology.
Re:Ask HN: How do you debug your code? by msellout on Tuesday March 29, 2016 @02:11PM (#11383542)
How do you use a debugger when your application is distributed across dozens of machines?
Re:Ask HN: How do you debug your code? by eiriklv on Tuesday March 29, 2016 @02:12PM (#11383552)
For threaded langs that might be true - but in js there are no race conditions in that sense, so console.logs are usually fine for debugging "out-of-order" stuff as well. This is ofc opinionated and based on preference, so YMMV.