1

I have an application where I can start it out in debug mode, and everything will run fine for several minutes until it will randomly pop up a box saying "You are debugg in a Release build of ***. Using Just My Code with Release builds using compiler optimizations results in a degraded debugging experiance...

I am running multiple projects at a time (they all depend on each other)

The project that it is erroring on is a class library that is referenced by both console applications and Web Api applications and is housing my data layer.

I have checked in the configuration manager and everything under debug is set to debug.

When I mention random above, at times it will error when I am trying to use the application, while other times it will error when sitting idle.

I have attempted to do a repair on Visual Studio and am using Visual Studio 2015.

I have also had other errors such as IIS Express just quit working out of nowhere, and I am using a machine with very good performance.

Does anyone have a suggestion on what I can troubleshoot next? I just wouldn't think that it would be the code if the code is being executed before the error just fine.

dmoore1181
  • 1,793
  • 1
  • 25
  • 57
  • Hi, maybe you can get some help from [this thread](https://stackoverflow.com/questions/34028341/vs-2015-update-1-claiming-i-am-debugging-a-release-build). And please make sure your version is latest vs2015-update3. For IIS express you can try [this](https://stackoverflow.com/a/34311996/10910450).If it not works, trying disabling `enable just my code`. – LoLance Sep 04 '19 at 03:20
  • Also, you can check if enabling or disabling `Suppress JIT optimization` option makes any difference. But please make sure clean and rebuild the solution after every test. – LoLance Sep 04 '19 at 03:21
  • also check the project settings (right click the project in Visual Studio and select the lowest entry. Might be called 'Properties' or 'Settings') , go into `Build` and check that the combobox at the top says `Active (Debug)`, that the checkbox `DEBUG-Constant` is checked and that `Optimize code` is _not_ selected. Those are the default settings for debug mode compilation. – Steffen Winkler Sep 04 '19 at 11:13
  • @SteffenWinkler, I have checked and these settings are currently set. – dmoore1181 Sep 04 '19 at 13:06

1 Answers1

1

I finally figured out the "fix", which is very strange. I went in and enabled Suppress JIT optimization and everything went to working. I then disabled it to ensure that was the issue, but it has continued to work. I am not sure how this fixed this issue, but all appears to be working now.

Also, I am running Update 3 as asked above.

dmoore1181
  • 1,793
  • 1
  • 25
  • 57
  • Hi friend, thanks for your sharing and please mark your reply as answer and that will help other community members who easier search this useful information, it just a reminder :) – LoLance Sep 06 '19 at 07:11
  • @LanceLi-MSFT, I had to wait, Stack Overflow wouldn't let me accept my answer for several hours. – dmoore1181 Sep 06 '19 at 15:14