473,386 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Debug vs. Release Executable size

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
Jul 21 '05 #1
8 2294
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" <po***********@hotmail.com> wrote in message
news:u3**************@TK2MSFTNGP12.phx.gbl...
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

Jul 21 '05 #2
> > 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
Jul 21 '05 #3
You are correct. When you compile in release mode the .pdb file does not
get created.
"Flare" <no****@sorry.dk> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
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

Jul 21 '05 #4
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
Jul 21 '05 #5
I can't say (I do have VS.NET and don't use the .pdb file myself).
"Gernot Frisch" <Me@Privacy.net> wrote in message
news:c0*************@ID-37212.news.uni-berlin.de...
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

Jul 21 '05 #6
> 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" <Me@Privacy.net> wrote in message
news:c0*************@ID-37212.news.uni-berlin.de... 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

Jul 21 '05 #7
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 ev******@zicf.bet is encrypted with ROT13 (www.rot13.org)
sign up for my free .NET newsletter at
http://www.wd-mag.com/newsletters/
Jul 21 '05 #8
Release code should be built with /debug:pdbonly. 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.

Jul 21 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Bhavna Rohra | last post by:
Hello everyone, Sorry, it might sound easy for everyone but please if someone colud tell me how to debug my MFC application in Release mode. Thanks
3
by: AKA COOPERMAN | last post by:
As C# express only creates RELEASE builds, how do I get my Debug.WriteLine statements to work ?
7
by: Srinivasa Rao | last post by:
I have read in one article that when we compile the application in release mode, all the debug classes and properties will be automatically removed from the code. I tried to implement this thing by...
3
by: | last post by:
Since I need to dotfuscate my exe file anyway, does it make any difference if I use Debug or Release versions. Would a Debug version be easier to decompile/study/reverse engineer than a Release...
8
by: Pocket Rocket | last post by:
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...
7
by: MB | last post by:
I had a C++ dll that I used for C++ applications. I added a managed C++ class to this library and started to use the managed C++ class in my C# application. This works OK only if I build the C++...
5
by: Jonas Hallgren | last post by:
Hello, Is there any general tips on how to solve this problem: my Debug version runs fine but when I do a Release version I get error messages!? I'm hoping it is a simple option somewhere or...
5
by: Anil Gupte | last post by:
Is there any way to define a variable that recognizes Debug versus Release versions? Basically, in the two versions, I want to use different directiories for certain tasks. For example If...
2
by: Dave Johansen | last post by:
I just converted a solution from Visual Studio 2003 to Visual Studio 2005 and the Debug mode seems to be running just fine, but the Release mode crashes on the following code: std::ifstream...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.