Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploying app to production using Debug Mode rather than Release Mode?

I work for a shop that maintains a fairly new app. The app still has its fair share of bugs, with numerous tickets coming in daily. The error information we're given with those tickets is not as useful as it might be because the application was compiled in Release mode, which I read is smaller and faster (makes sense).

Are there any ramifications to deploying a .NET application to production that was compiled in Debug mode? I would expect it would be a bit slower, but I've read the difference is nominal. This would assure us that when we get errors on tickets we have line number associated with those errors and this, of course, makes debugging much easier.

Any major red flags that would prevent you from doing this? I'm tasked with researching the possibility. So thanks for any feedback.

like image 256
Mario Avatar asked Oct 28 '10 14:10

Mario


People also ask

What is the difference between Release and debug build?

Debug Mode: When we are developing the application. Release Mode: When we are going to production mode or deploying the application to the server. Debug Mode: The debug mode code is not optimized. Release Mode: The release mode code is optimized.

What is difference between debug and Release in Visual Studio?

Visual Studio projects have separate release and debug configurations for your program. You build the debug version for debugging and the release version for the final release distribution. In debug configuration, your program compiles with full symbolic debug information and no optimization.

Is debug slower than Release?

Default Debug build is x240 times slower than default Release build. With all the aforementioned settings enabled, Fast Debug build is only x3 times slower than Release build (and that's with optimization still disabled!).


1 Answers

Deploying your app in DEBUG instead of Release mode will slow down your performance. Of course compromises can be made. I would suggest one of the following:

  • Look at adding a global error handler to the OnError in your global.asax-
  • Look at a compromise similar to this one suggest by Scott Hanselman
like image 160
bechbd Avatar answered Sep 30 '22 16:09

bechbd