Can’t Debug After Running Benchmark.net

Quick post to explain why you might not be able to debug your C# Visual Studio code or debug your unit tests after running Benchmark.net.

Can’t Debug After Running Benchmark.net

How quick is a quick post? Well:

🤔Did you forget to switch back to the debug config? 🤔

I've spent a non-zero amount of time wondering why I can't debug my code or unit tests after running benchmark.net and it's because I put the code into release configuration such that the benchmarking is more accurate.

You know, this:

🤷‍Sometimes I do just forget to go into debug after 🤷‍♂️

This post is kinda gonna be like equivalent of:

https://twitter.com/SeaRyanC/status/1512549675835944962

Or this...

https://twitter.com/Nick_Craver/status/1511706578583490569

It happens. Good luck to you, dear reader 👍