Share via


Dubugger doesn't work - "you are debugging a release build..."

Question

Monday, January 22, 2018 5:37 PM | 1 vote

My project is a web service project.  I have been working on it for weeks and everything has been fine.  For some unknown reason I started getting the error:You are debugging a release build of "my project.dll". The build is in debug mode.  To the best of my knowledge, I didn't change any settings.  It just stopped working.

I researched this and found numerous posts but none of the solutions has worked for me.  I have cleaned, rebuilt, restarted IIS, rebooted, upgraded visual studio, etc, etc, etc.  Nothing has worked.

I have had similar errors on different projects before, and the Clean usually fixes, but not this time.

How do I fix this?  I will never get the 1/2 day wasted back!

All replies (7)

Tuesday, January 23, 2018 2:47 AM | 2 votes

Use the Configuration Manager to check what the actual settings are for the Debug configuration - it's at Build\Configuration Manager in the main menu - in case they are set to use Release:

 

Also, make sure the project is defining DEBUG correctly, and that "Optimize Code" is not checked:

 

Regards,

Fletcher

MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected].


Monday, January 29, 2018 10:32 PM

I checked bot of these things (multiple times).  They are set correctly.  I have tries everything anyone ever suggested related to this issue.  I can;t get around it.  Today, I installed Visual Studio 2017 Preview.  It did the same thing.   The only thing I can think of is to create a new empty project, and add my code to it.  It seems there is something in the project causing things not to work.    That might work, but it seems like a serious problem to me if I can't debug my code.

BTY, I am using:

Microsoft Visual Studio Community 2017 
Version 15.5.4
VisualStudio.15.Release/15.5.4+27130.2024
Microsoft .NET Framework
Version 4.7.02558

Installed Version: Community

Visual Basic 2017   00369-60000-00001-AA819
Microsoft Visual Basic 2017

Visual C# 2017   00369-60000-00001-AA819
Microsoft Visual C# 2017

Visual C++ 2017   00369-60000-00001-AA819
Microsoft Visual C++ 2017

Visual F# 4.1   00369-60000-00001-AA819
Microsoft Visual F# 4.1

Application Insights Tools for Visual Studio Package   8.10.01106.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2017   15.0.31127.0
ASP.NET and Web Tools 2017

ASP.NET Core Razor Language Services   1.0
Provides languages services for ASP.NET Core Razor.

ASP.NET Web Frameworks and Tools 2012   4.0.20601.0
For additional information, visit https://www.asp.net/

ASP.NET Web Frameworks and Tools 2017   5.2.51007.0
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0   15.0.31106.0
Azure App Service Tools v3.0.0

Azure Data Lake Node   1.0
This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio   2.2.9000.1
Microsoft Azure Data Lake Tools for Visual Studio

Azure Data Lake Tools for Visual Studio   2.2.9000.1
Microsoft Azure Data Lake Tools for Visual Studio

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Fabric.DiagnosticEvents   1.0
Fabric Diagnostic Events

GitHub.VisualStudio   2.2.0.10
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

JavaScript UWP Project System   2.0
JavaScript UWP Project System

Merq   1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Microsoft Azure HDInsight Azure Node   2.2.9000.1
HDInsight Node under Azure Node

Microsoft Azure Hive Query Language Service   2.2.9000.1
Language service for Hive query

Microsoft Azure Service Fabric Tools for Visual Studio   1.8
Microsoft Azure Service Fabric Tools for Visual Studio

Microsoft Azure Stream Analytics Language Service   2.2.9000.1
Language service for Azure Stream Analytics

Microsoft Azure Stream Analytics Node   1.0
Azure Stream Analytics Node under Azure Node

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.51120.3

Microsoft Continuous Delivery Tools for Visual Studio   0.3
Simplifying the configuration of continuous build integration and continuous build delivery from within the Visual Studio IDE.

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards   1.0
Microsoft Visual C++ Wizards

Microsoft Visual Studio Tools for Containers   1.1
Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.

Microsoft Visual Studio VC Package   1.0
Microsoft Visual Studio VC Package

Mono Debugging for Visual Studio   4.8.4-pre (3fe64e3)
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager   4.5.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

SQL Server Data Tools   15.1.61710.120
Microsoft SQL Server Data Tools

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript Tools   15.5.11025.1
TypeScript Tools for Microsoft Visual Studio

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Tools for Apache Cordova   15.123.6829.2
Visual Studio Tools for Apache Cordova

Visual Studio Tools for Universal Windows Apps   15.0.27130.2020
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

VisualStudio.Mac   1.0
Mac Extension for Visual Studio

WebJobs Tools v1.0.0   15.0.31106.0
WebJobs Tools v1.0.0

Xamarin   4.8.0.757 (7f9ec2a)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer   4.8.188 (c5813fa34)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin.Android SDK   8.1.3.0 (HEAD/ef47226b7)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK   11.6.1.2 (6857dfc)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

AlessiJax


Tuesday, January 30, 2018 7:30 AM | 1 vote

Please update to 15.5.5 which is the newest one at present.

Also, please disable this option under Debug->Options->Suppress JIT optimization on module load (Managed only), And turn off the “Enable Just My Code” in the Debugging General Options and see.

 

**>>The only thing I can think of is to create a new empty project, and add my code to it.  It seems there is something in the project causing things not to work.   **

Does it mean it run fine in the new project?  If so, it's more related to the code in the project other than VS IDE issues, right?

 

Regards,

Fletcher

MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected].


Thursday, August 15, 2019 12:25 PM

This worked for me. (Sad I wasted few hours finding everywhere..) Thanks Fletch!


Thursday, September 12, 2019 1:43 PM

This solution worked fine. 

Preferer 32-bit Platform targets Check seems necessary for Console Applications


Thursday, October 10, 2019 12:06 PM

disable this option under Debug->Options->Suppress JIT optimization on module load (Managed only), And turn off the “Enable Just My Code

This isn't a solution. It's just hiding the message. The issue isn't solved by just hiding the warning message, I'm afraid.


Monday, November 11, 2019 1:17 AM

Please update to 15.5.5 which is the newest one at present.

Also, please disable this option under Debug->Options->Suppress JIT optimization on module load (Managed only), And turn off the “Enable Just My Code” in the Debugging General Options and see.

 

**>>The only thing I can think of is to create a new empty project, and add my code to it.  It seems there is something in the project causing things not to work.   **

Does it mean it run fine in the new project?  If so, it's more related to the code in the project other than VS IDE issues, right?

 

Regards,

Fletcher

MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected].

Thanks. Perfectly working!