this post was submitted on 01 Aug 2023
50 points (100.0% liked)

Programming

423 readers
5 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] snowe@programming.dev 2 points 1 year ago (1 children)

they explicitly call out that they won't perform the predictive calls unless they're sure it doesn't modify state.

A prediction can also end at a function call the debugger is cautious about evaluating. That is for your own (or your software’s) well-being. Since code is executed during debugging, the debugger has to be sure that it’s not causing any mutations. When running the above example, we must confirm the evaluation of the int.TryParse method (more about that later):

As mentioned in the previous section, the predictive debugger won’t evaluate possibly impure functions to avoid side effects. As a human developer, you most certainly have more knowledge about the code, which is why we give you the possibility to forcefully evaluate a call by clicking the hint:

[–] agilob@programming.dev 2 points 1 year ago (1 children)

They do say that, but how much can it be trusted? Can they really detect all native interface calls? Be aware of all future file system checks or event driven programming paradigms? hashset.getOrElse() where uniqueness decides future flow? I'm sure we will be experiencing or at least seeing bug reports related to predictive debugger triggering mutations.

[–] cd_slash_rmrf@programming.dev 2 points 1 year ago

I'm struggling to see how bug reports found using this prediction approach would ever be sent as anything but bugs of the predictive debugger itself.

how would end-users ever see bugs caused by a debugger the devs use? how would users of a third-party library conflate bugs in their own code/the third-party code when you can see which lines are which as you debug?