#100DaysOfCode - Day 70: Visual Studio's 'Just my Code' Bug

#100DaysOfCode - Day 70: Visual Studio's 'Just my Code' Bug

1 min

Hi friends!

Yesterday (day 70), I spent a large part of the day working through an issue with my workstation in Visual Studio 2017, where I had previously enabled Visual Studio’s “Just my Code” that auto-triggers breakpoints on user handled exceptions thrown. It’s a generally very useful feature, but will download a bunch of code for C# libraries that you depend on, in case the exception you “catch” within your own code is actually from there.

While very handy, there also seems to be an issue with Visual Studio 2017, where it will download the local files (pre-compiled, so they’re human readable), and change another setting to keep Visual Studio from downloading the compiled files from Visual Studio, using the downloaded ones in place.

This works great, until you disable “Just my code”, and clear out those .pdb files trying to clear cache for other issues. Then you’ll get a bunch of “.pdb files cannot be found” errors, which can only be updated by re-enabling the option to download from Microsoft.

There were definitely other issues that I had run into through-out the day, but I found this one the most interesting and worth writing about. I will aim to loop back with screenshots and a link to the setting later on.

Happy coding!

~ Moxnr

Written on January 8, 2021