PC Review


Reply
Thread Tools Rate Thread

Debug vs. Release Executable size

 
 
Pocket Rocket
Guest
Posts: n/a
 
      12th Feb 2004
I am developing an application using Windows forms, C# and Visual
Studio.Net. The executable size remains the same whether I built the debug
or release version. Is it normal? Am I missing something? Thanks for ur
help.

PR


 
Reply With Quote
 
 
 
 
Scott M.
Guest
Posts: n/a
 
      12th Feb 2004
The physical size of the assembly will not always change when in release
mode, yet you may still get a better performing assembly.

Please do not cross-post your questions.


"Pocket Rocket" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I am developing an application using Windows forms, C# and Visual
> Studio.Net. The executable size remains the same whether I built the

debug
> or release version. Is it normal? Am I missing something? Thanks for ur
> help.
>
> PR
>
>



 
Reply With Quote
 
Flare
Guest
Posts: n/a
 
      12th Feb 2004
> > I am developing an application using Windows forms, C# and Visual
> > Studio.Net. The executable size remains the same whether I built the

> debug
> > or release version. Is it normal? Am I missing something? Thanks for

ur
> > help.


I believe the debug information is located in the pdb file and only a little
amount of infomation about debuging is in the actual assembly..Correct me if
im wrong.

Regards Anders


 
Reply With Quote
 
Scott M.
Guest
Posts: n/a
 
      12th Feb 2004
You are correct. When you compile in release mode the .pdb file does not
get created.


"Flare" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> > > I am developing an application using Windows forms, C# and Visual
> > > Studio.Net. The executable size remains the same whether I built the

> > debug
> > > or release version. Is it normal? Am I missing something? Thanks

for
> ur
> > > help.

>
> I believe the debug information is located in the pdb file and only a

little
> amount of infomation about debuging is in the actual assembly..Correct me

if
> im wrong.
>
> Regards Anders
>
>



 
Reply With Quote
 
Gernot Frisch
Guest
Posts: n/a
 
      12th Feb 2004
So, do I need the pdb file if I want to know the file+line where the
program crashes on a computer without VS installed?
-Gernot


 
Reply With Quote
 
Scott M.
Guest
Posts: n/a
 
      12th Feb 2004
I can't say (I do have VS.NET and don't use the .pdb file myself).


"Gernot Frisch" <(E-Mail Removed)> wrote in message
news:c0g3k3$15essu$(E-Mail Removed)...
> So, do I need the pdb file if I want to know the file+line where the
> program crashes on a computer without VS installed?
> -Gernot
>
>



 
Reply With Quote
 
Alvin Bruney [MVP]
Guest
Posts: n/a
 
      13th Feb 2004
> So, do I need the pdb file if I want to know the file+line where the
> program crashes on a computer without VS installed?


absolutely.
but your release product should not be in debug mode for performance and
possibly security resasons. the exception is when you have a special problem
you can send a debug version to the customer to enable you to better
troubleshoot the problem.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Gernot Frisch" <(E-Mail Removed)> wrote in message
news:c0g3k3$15essu$(E-Mail Removed)...
> So, do I need the pdb file if I want to know the file+line where the
> program crashes on a computer without VS installed?
> -Gernot
>
>



 
Reply With Quote
 
Richard Grimes [MVP]
Guest
Posts: n/a
 
      16th Feb 2004
Pocket Rocket wrote:
> I am developing an application using Windows forms, C# and Visual
> Studio.Net. The executable size remains the same whether I built the
> debug or release version. Is it normal? Am I missing something?


In addition to what has already been posted on this subject bear in mind
that the compiler will add the [Debuggable] attribute to a debug build to
turn off JIT optimization and to tell the .NET runtime to track how objects
are used (and make this information available to the debugger). Thus, it is
not a good idea to use debug build assemblies in a production environment
because their performance will be impaired.

Richard
--
my email (E-Mail Removed) is encrypted with ROT13 (www.rot13.org)
sign up for my free .NET newsletter at
http://www.wd-mag.com/newsletters/


 
Reply With Quote
 
Pavel Lebedinsky
Guest
Posts: n/a
 
      18th Feb 2004
Release code should be built with /debugdbonly. This way you get
both optimizations and symbols.

I'm not sure if VS project editor allows you to set this option though.

"Alvin Bruney [MVP]" wrote:

> > So, do I need the pdb file if I want to know the file+line where the
> > program crashes on a computer without VS installed?

>
> absolutely.
> but your release product should not be in debug mode for performance and
> possibly security resasons. the exception is when you have a special

problem
> you can send a debug version to the customer to enable you to better
> troubleshoot the problem.



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
same assembly size for debug and release Tony Johansson Microsoft C# .NET 2 16th Nov 2010 01:23 PM
debug vs release Mel Microsoft VB .NET 4 10th Oct 2008 08:45 PM
Config Mgr Debug/Release and Web.config Compilation debug=true RonL Microsoft ASP .NET 0 8th Apr 2006 04:50 PM
Can I attach an External Debug Window to My Running Executable? Charles Law Microsoft VB .NET 6 28th Jul 2004 03:06 PM
Debug vs. Release Executable size Pocket Rocket Microsoft Dot NET Framework 8 18th Feb 2004 09:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:44 PM.