Search code examples
c#.netvisual-studioconfigurationconfigurationmanager

How do you get new configurations to stop on breakpoints in Visual Studio?


I am using VS 2019.

Debug and Release builds work as expected.

I've added 4 other configurations in order for developers on our team to quickly switch between all of our lower environments.

I am using config transforms to transform the web.config on build and in the release. This is all working as expected. The compilation debug=true for all our lower environments.

<compilation debug="true" targetFramework="4.5.2" />

However, whenever I try to run on a new configuration for the lower environments added, it tells me that The breakpoint will not currently be hit. No symbol has been loaded for this document.

enter image description here

How do I enable debugging on all the new configurations that I have added via the configuration manager?


Solution

  • I had separate web.config files for each of the new configurations. None of the solutions posted worked for me. I ended up having to stay selected on Debug.

    I would preview transform for the given configuration and copy the output of that preview into the file used by the web.debug.config.

    This allowed me to run the application in debug against a new environment.