Introducing Predictive Debugging: A Game-Changing Look into the Future | The .NET Tools Blog
blog.jetbrains.com
external-link
With the introduction of debugging tools, software developers were empowered to interactively investigate the control flow of software programs to find bugs in live environments. At JetBrains, we've a

preemptively running source as it was written

It’s not preemptively running source as it’s being written, it’s preemptively evaluating methods as you’re debugging it

This looks like it’s preemptive compiling, which isn’t just unwise, it’s potentially dangerous.

So I think what you might mean is preemptively evaluating methods at runtime? - which would be unwise / potentially dangerous - since it could cause side effect

For example, evaluating a method that increments something and modifies the state. So if it’s preemptively called by the debugger, the state would be modified, and the actual invocation would be different

I installed the Resharper RC, and this is how it looks like in a small project that parses an excel file: https://i.imgur.com/g4s0P3h.png

So, in the example my debugger is still on the allTheFieldsEmpty line and hasn’t ran it yet, but resharper already evaluated it to false. Then it also greyed out everything in the if(allTheFieldsEmpty) block, since it knows it wouldn’t hit that

The next line you can see there was a warning, “Possible impure evaluation” - which is that I assume you were talking about, and it didn’t evaluate that yet. I can click the box and make it evaluation it.

The debugger inspects the method, as the article mentions, it check for the PureAttribute - indicating that it’s safe to use

After I marked that GetMappingField method as Pure, it actually did evaluate it without any interaction, and it predicted it would throw an exception https://i.imgur.com/zQ0K3Ge.png - seems pretty useful so far

Don’t get me wrong, I hope this works out, but I still think it’s trusting far too many decisions to the IDE. It feels like feature bloat.

Which, is why I’m asking if anyone has had an issue which this would legitimately have helped solve.

I don’t think this will necessarily help solve issues you wouldn’t be able to solve without this, though I used similar tools in the past (Ozcode) and it did make debugging easier / faster

Create a post

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



  • 1 user online
  • 1 user / day
  • 1 user / week
  • 1 user / month
  • 1.11K users / 6 months
  • 1 subscriber
  • 1.21K Posts
  • 17.8K Comments
  • Modlog