Introducing Predictive Debugging: A Game-Changing Look into the Future - eviltoast
  • snowe@programming.devM
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    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.devOP
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      1 year ago

      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
        link
        fedilink
        arrow-up
        2
        ·
        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?