News for hackers. Stuff that matters.
Re:Want cleaner code? Use the rule of six by wizofaus on Saturday September 24, 2022 @03:23PM (#32965775)
It's been my feeling for a while that debugger technology hasn't really caught up with newer styles of coding (despite them having been around for over a decade). Only being able to set a breakpoint at a line-level or watch values that are assigned to a named variable is incredibly limiting.
Re:Want cleaner code? Use the rule of six by veltas on Sunday September 25, 2022 @01:02AM (#32969069)
gdb for a long time has been able to watch almost any expression at all. Unfortunately the visual studio debugger can't watch very much at all and that's what many of us are stuck with.
Re:Want cleaner code? Use the rule of six by wizofaus on Sunday September 25, 2022 @03:16AM (#32969564)
VS's debugger can watch arbitrary expressions, but it's not necessarily what you want (and admittedly isn't always reliable, or causes severe performance issues depending on the language etc.). What I'd really like is the ability to set breakpoints anywhere at all on a line, including a line like `xyz.map(_ -> ...).filter(_ -> ...)` such that, e.g. I can set a breakpoint between map( ) finishing and filter being called such that I can see what the map function has returned/what will be passed to filter, and of course at any point inside the lambda functions. And it's not just VS (or even VS code), but Chrome DevTools, XCode, IntelliJ/Android Studio etc. etc.