sicKo
sicKo

Reputation: 1256

VS2019 - Debug option is missing from configuration

I have a solution which contains multiple projects. The thing is, there is 1 web app project which does not have debug option. So every time I run it, the breakpoint won't be hit.

I am using VS 2019 with IISExpress.

Here are the screen shot of my issue. This is from the project properties enter image description here

This is from the solution properties. Note that all other projects selected 'Debug' but the option is not available for this 1 app. enter image description here

From web.config

enter image description here

The below ss is from my other application within the same solution. Note that the 'Debug' option is there. enter image description here

So my question is how can I enable the debug option for this project?

Upvotes: 0

Views: 2741

Answers (1)

Joe Sewell
Joe Sewell

Reputation: 6640

There's nothing special about the "Debug" build configuration that makes debugging possible - the actual setting is "Optimize code". You could choose to disable this option (and thus enable debugging) for your current configuration, but if you want to first edit your project to be in line with the rest of the other projects (i.e., to have a separate "Debug" configuration):

  1. Open the configuration manager.
  2. Ensure "Debug" is selected for the Active solution configuration dropdown.
  3. Use the configuration dropdown for your project to add a new configuration, and give it the name "Debug". Whether you copy the initial settings from another configuration depends on what those other configurations mean, which is dependent on whoever set up your solution.
  4. Close the configuration manager and, ensuring the configuration is still set to "Debug", open up the project's properties and ensure the "Optimize code" setting is unchecked.

Upvotes: 2

Related Questions