![]() |
|
|
|
#1 |
|
Guest
Posts: n/a
|
Debug vs. Release Build
It is my understanding - and please correct me if I'm wrong - that when
building a project in debug mode, I can deploy the .pdb file along with the ..exe and thereby have access to the specific line number of code that throws an exception. Specifically, I can have an error logging routine that, amongst other things parses the call stack and tells me the specific line of code that choked. It is also my understanding that if building in Release mode that I won't get the .pdb file and/or have programmatic knowledge of the specific line of code that threw an exception. If the above is true, then that would seem to be a big advantage of building in debug mode and putting that into production - rather than building in release mode. What do you think? I'm looking for reasons to build in "Release mode" but can't seem to get past the fact that I lose the knowledge of which line of code choked. I would appreciate your perspective on this... and what is different about building as Release vs. Debug. Advertisement |
|
|
#2 |
|
Guest
Posts: n/a
|
RE: Debug vs. Release Build
Never ever put debug builds into production. Your build process should emit
release builds, so all system testing is on production code. You CAN create pdbs for release builds; in VS 2005, go to project properties, Build, set the Configuration to Release, click Advanced, and set Debug Info to pdb-only (not the default). Microsoft recommend not using full info for release builds, as this impacts size, performance and code quality, whereas pdb-only does not. However you do not need a pdb to find out where an exception occurred - just log Exception.ToString(), which includes the stack trace. The pdb is useful if you want to debug the production system, e.g., attach a debugger to the running process (requires full info), or debug a crash dump. You can do this using windbg, part of the Microsoft Debugging Tools for Windows. "Bob Johnson" wrote: > It is my understanding - and please correct me if I'm wrong - that when > building a project in debug mode, I can deploy the .pdb file along with the > ..exe and thereby have access to the specific line number of code that throws > an exception. Specifically, I can have an error logging routine that, > amongst other things parses the call stack and tells me the specific line of > code that choked. > > It is also my understanding that if building in Release mode that I won't > get the .pdb file and/or have programmatic knowledge of the specific line of > code that threw an exception. > > If the above is true, then that would seem to be a big advantage of building > in debug mode and putting that into production - rather than building in > release mode. > > What do you think? > > I'm looking for reasons to build in "Release mode" but can't seem to get > past the fact that I lose the knowledge of which line of code choked. > > I would appreciate your perspective on this... and what is different about > building as Release vs. Debug. > > > |
|
|
#3 |
|
Guest
Posts: n/a
|
Re: Debug vs. Release Build
"Adrian" <Adrian@discussions.microsoft.com> wrote in message
news:BDC5B31D-63E4-41ED-A9CE-D21D4FCC4EC4@microsoft.com... > However you do not need a pdb to find out where an exception occurred - > just > log Exception.ToString(), which includes the stack trace. But if you do deploy the pdb file, you will get much more detailed information about the exception, even down to the number of the line which threw it... -- Mark Rae ASP.NET MVP http://www.markrae.net |
|
|
#4 |
|
Guest
Posts: n/a
|
Re: Debug vs. Release Build
Advertisement We've been deploying Release builds with PDB files for years now. It's just
an option in Visual Studio, and it's also easily set using MSBuild or NAnt. Without the ability to do this, we would be screwed. -- Chris Mullins "Bob Johnson" <A@B.com> wrote in message news:%23vCbI%231BIHA.5600@TK2MSFTNGP04.phx.gbl... > It is my understanding - and please correct me if I'm wrong - that when > building a project in debug mode, I can deploy the .pdb file along with > the .exe and thereby have access to the specific line number of code that > throws an exception. Specifically, I can have an error logging routine > that, amongst other things parses the call stack and tells me the specific > line of code that choked. > > It is also my understanding that if building in Release mode that I won't > get the .pdb file and/or have programmatic knowledge of the specific line > of code that threw an exception. > > If the above is true, then that would seem to be a big advantage of > building in debug mode and putting that into production - rather than > building in release mode. > > What do you think? > > I'm looking for reasons to build in "Release mode" but can't seem to get > past the fact that I lose the knowledge of which line of code choked. > > I would appreciate your perspective on this... and what is different about > building as Release vs. Debug. > > Advertisement |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Compiling a Release Platform uses Debug DLLs | O.B. | C#(C Sharp) | 3 | 02-10-2007 04:23 PM |
| i seem to be having memory issues, will deplying a release build instead of a debug build help with memory usage of my .net process? | Daniel | C#(C Sharp) | 2 | 18-09-2007 10:02 AM |
| debug/release exe is not working... | Alex | VC.NET | 4 | 10-09-2007 08:01 AM |
| Java Build & Release Engineer | Ann | Java | 0 | 06-09-2007 10:00 AM |
| Implement Interface in debug build only | ramhog | C#(C Sharp) | 8 | 05-09-2007 09:03 AM |
< Home - Windows Help - MS Office Help - Hardware Support >
| New To Site? | Need Help? |