When referencing a class library .DLL file in a Visual Studios project you cannot break or step into your class library code right out of the box. When you select some implementation (Ctrl+F12) of one of your library’s classes, if you set a point you will be met with a fuzzy exclamation breakpoint that doesn’t actually break. Your breakpoints get passed by when the code is ran.
Follow these steps in Visual Studio 2019 to fix this for proper debugging purposes.
First confirm there are no issues with loading your library in your project’s reference list. If the reference isn’t loaded successfully, you might have to delete and re-add the Reference again. If this is in error the rest won’t work.
Turning off the JIT
Go to the top menu and select Tools -> Options
In the new window, Go to Debugging -> General and un-check “Enable Just My Code”
Next go to Debugging -> Just-In-Time and un-check all three options.
Loading our class library symbols
Start your project and go to Debug -> Windows -> Modules (Ctrl+D, M)
Scroll down to your class library list item, right click and select “Load Symbols”
Right click again and select “Always Load Automatically”
Fruits of our labor
Now when we run through the method we have set our breakpoint to; a break as we normally would expect. Using this procedure also saves time as every time you start up the project, you don’t have to re-configure. It will load automatically now.
Happy Debugging!
Comments are closed, but trackbacks and pingbacks are open.