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](/content/images/size/w2000/2022/10/header-3.jpg)
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:
![](https://www.nikouusitalo.com/content/images/2022/10/demo.gif)
This post is kinda gonna be like equivalent of:
![](https://www.nikouusitalo.com/content/images/2023/07/image-3.png)
Or this...
![](https://www.nikouusitalo.com/content/images/2023/07/image-4.png)
It happens. Good luck to you, dear reader 👍