Welcome Guest Search | Active Topics | Members | Log In | Register

Debug vs. Release Build Options · View
Bob Johnson
Posted: Friday, October 05, 2007 12:53:52 AM


Rank: Guest
Groups: Guest

Joined: 9/17/2007
Posts: 11,670
Points: -1,200
Date parsed: 05/10/2007 00:53:52
Date: Fri, 5 Oct 2007 07:53:52 -0700

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.


Bob Johnson
Posted: Friday, October 05, 2007 12:53:52 AM


Rank: Guest
Groups: Guest

Joined: 9/17/2007
Posts: 11,670
Points: -1,200
Date parsed: 05/10/2007 00:53:52
Date: Fri, 5 Oct 2007 07:53:52 -0700

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.


Chris Mullins [MVP - C#]
Posted: Friday, October 05, 2007 2:49:22 AM


Rank: Guest
Groups: Guest

Joined: 9/17/2007
Posts: 11,670
Points: -1,200
Date parsed: 05/10/2007 02:49:22
Date: Fri, 5 Oct 2007 09:49:22 -0700

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.
>
>


Mark Rae [MVP]
Posted: Friday, October 05, 2007 6:13:08 PM


Rank: Guest
Groups: Guest

Joined: 9/17/2007
Posts: 11,670
Points: -1,200
Date parsed: 05/10/2007 18:13:08
Date: Fri, 5 Oct 2007 17:13:08 +0100

"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

Mark Rae [MVP]
Posted: Friday, October 05, 2007 6:13:08 PM


Rank: Guest
Groups: Guest

Joined: 9/17/2007
Posts: 11,670
Points: -1,200
Date parsed: 05/10/2007 18:13:08
Date: Fri, 5 Oct 2007 17:13:08 +0100

"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

Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

YAFPro Theme Created by Jaben Cargman (Tiny Gecko)
Powered by Yet Another Forum.net version 1.9.1.1 (NET v2.0) - 9/10/2007
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.
This page was generated in 0.077 seconds.