473,508 Members | 2,324 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.PDB contains less information in RELEASE than in DEBUG?!

it's me again..
with quite interesting discovery :)

I was tracing an error for 3 hours instead of 3 minutes because of this
surprise.

Recently I'm compiling this project in RELEASE with Debug info turned on so
that it creates .PDB files and I can see the line numbers in stack trace.

To my surprise, release version of .pdb pointed me only to the beginning of
the method saying that Index was out of range. But there was nothing like
that there. After finding an error by other means, I tried to compile the
project in debug mode and regenerate the error. This time I saw the correct
line number. If the release version pointed me to here, I could see what's
the problem immediatelly.

how can I force release PDB to behave like debug PDB?
Release PDB only gives me approxiamate exception location!?

THANK YOU!

david
Nov 16 '05 #1
5 6582
Obviously, the Release mode is not the same thing as the Debug mode;
otherwise it would be totally unnecessary.

The release mode cannot give you the exact location because the code has
been internally optimized by the compiler and things such as a "line of
code" doesn't really exist anymore.

S. L.

"David Krmpotic" <no**@spam.ne> wrote in message
news:NV*******************@news.siol.net...
it's me again..
with quite interesting discovery :)

I was tracing an error for 3 hours instead of 3 minutes because of this
surprise.

Recently I'm compiling this project in RELEASE with Debug info turned on
so
that it creates .PDB files and I can see the line numbers in stack trace.

To my surprise, release version of .pdb pointed me only to the beginning
of
the method saying that Index was out of range. But there was nothing like
that there. After finding an error by other means, I tried to compile the
project in debug mode and regenerate the error. This time I saw the
correct
line number. If the release version pointed me to here, I could see what's
the problem immediatelly.

how can I force release PDB to behave like debug PDB?
Release PDB only gives me approxiamate exception location!?

THANK YOU!

david

Nov 16 '05 #2
I know it's not the same.. but I was hoping that this would still be
possible in release.
only that asserts would be thrown out in debug and some other things.

so that's just how it is ?

ok then.. thank you !

"Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
wrote in message news:uW**************@TK2MSFTNGP10.phx.gbl...
Obviously, the Release mode is not the same thing as the Debug mode;
otherwise it would be totally unnecessary.

The release mode cannot give you the exact location because the code has
been internally optimized by the compiler and things such as a "line of
code" doesn't really exist anymore.

S. L.

"David Krmpotic" <no**@spam.ne> wrote in message
news:NV*******************@news.siol.net...
it's me again..
with quite interesting discovery :)

I was tracing an error for 3 hours instead of 3 minutes because of this
surprise.

Recently I'm compiling this project in RELEASE with Debug info turned on
so
that it creates .PDB files and I can see the line numbers in stack trace.
To my surprise, release version of .pdb pointed me only to the beginning
of
the method saying that Index was out of range. But there was nothing like that there. After finding an error by other means, I tried to compile the project in debug mode and regenerate the error. This time I saw the
correct
line number. If the release version pointed me to here, I could see what's the problem immediatelly.

how can I force release PDB to behave like debug PDB?
Release PDB only gives me approxiamate exception location!?

THANK YOU!

david


Nov 16 '05 #3
Perhaps try changing the 'Optimize code' option (in the projects settings)
for the release configuration to false.

"David Krmpotic" <no**@spam.ne> wrote in message
news:8L*******************@news.siol.net...
I know it's not the same.. but I was hoping that this would still be
possible in release.
only that asserts would be thrown out in debug and some other things.

so that's just how it is ?

ok then.. thank you !

"Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
wrote in message news:uW**************@TK2MSFTNGP10.phx.gbl...
Obviously, the Release mode is not the same thing as the Debug mode;
otherwise it would be totally unnecessary.

The release mode cannot give you the exact location because the code has
been internally optimized by the compiler and things such as a "line of
code" doesn't really exist anymore.

S. L.

"David Krmpotic" <no**@spam.ne> wrote in message
news:NV*******************@news.siol.net...
> it's me again..
> with quite interesting discovery :)
>
> I was tracing an error for 3 hours instead of 3 minutes because of this
> surprise.
>
> Recently I'm compiling this project in RELEASE with Debug info turned
> on
> so
> that it creates .PDB files and I can see the line numbers in stack trace. >
> To my surprise, release version of .pdb pointed me only to the
> beginning
> of
> the method saying that Index was out of range. But there was nothing like > that there. After finding an error by other means, I tried to compile the > project in debug mode and regenerate the error. This time I saw the
> correct
> line number. If the release version pointed me to here, I could see what's > the problem immediatelly.
>
> how can I force release PDB to behave like debug PDB?
> Release PDB only gives me approxiamate exception location!?
>
> THANK YOU!
>
> david
>
>



Nov 16 '05 #4
You got it! indeed, when I change it to false, it shows the exact line
number.
so I guess this is a tradeoff.. or...

... does anybody have some other suggestions for having the code optimized
and still get the right line number?


"Andrew Smith (Infragistics)" <pr************@infragistics.com> wrote in
message news:eg*************@TK2MSFTNGP15.phx.gbl...
Perhaps try changing the 'Optimize code' option (in the projects settings)
for the release configuration to false.

"David Krmpotic" <no**@spam.ne> wrote in message
news:8L*******************@news.siol.net...
I know it's not the same.. but I was hoping that this would still be
possible in release.
only that asserts would be thrown out in debug and some other things.

so that's just how it is ?

ok then.. thank you !

"Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
wrote in message news:uW**************@TK2MSFTNGP10.phx.gbl...
Obviously, the Release mode is not the same thing as the Debug mode;
otherwise it would be totally unnecessary.

The release mode cannot give you the exact location because the code has been internally optimized by the compiler and things such as a "line of
code" doesn't really exist anymore.

S. L.

"David Krmpotic" <no**@spam.ne> wrote in message
news:NV*******************@news.siol.net...
> it's me again..
> with quite interesting discovery :)
>
> I was tracing an error for 3 hours instead of 3 minutes because of this > surprise.
>
> Recently I'm compiling this project in RELEASE with Debug info turned
> on
> so
> that it creates .PDB files and I can see the line numbers in stack

trace.
>
> To my surprise, release version of .pdb pointed me only to the
> beginning
> of
> the method saying that Index was out of range. But there was nothing

like
> that there. After finding an error by other means, I tried to compile

the
> project in debug mode and regenerate the error. This time I saw the
> correct
> line number. If the release version pointed me to here, I could see

what's
> the problem immediatelly.
>
> how can I force release PDB to behave like debug PDB?
> Release PDB only gives me approxiamate exception location!?
>
> THANK YOU!
>
> david
>
>



Nov 16 '05 #5
"David Krmpotic" <no**@spam.ne> wrote in message
news:ue*******************@news.siol.net...
You got it! indeed, when I change it to false, it shows the exact line
number.
so I guess this is a tradeoff.. or...

.. does anybody have some other suggestions for having the code optimized
and still get the right line number?

I do not mean to disparage the explanation already
given about this. But I will try to clarify.

With no or very simple optimizations, there is a
one-to-one correspondence between lines of
source code and contiguous clumps of machine
code. Under such circumstances, it is meaningful
to speak of "the right line number".

There are levels of optimization, commonly
obtained by modern compilers, (including the
MS product), where there is no simple relation
between lines of source code and the clumps
of machine code. The whole idea of "stepping
thru lines of code" breaks down, becomes
inapplicable. The "right line number" does not
exist. It might be possible to assign fragments
of source code, consisting of subexpressions,
to an arbitrary (valid) instruction pointer, but
this is not done and would undoubtedly be
quite confusing if anybody actually did it.

The short answer to your question is "no".

--
--Larry Brasfield
email: do***********************@hotmail.com
Above views may belong only to me.
Nov 16 '05 #6

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

Similar topics

1
1883
by: Stanley | last post by:
I am working with Exceptions and have found a bit of a problem for me. Using the code below in Debug I get the info I want which is basically: -Line of error -Column of error -Method where error...
9
3240
by: Microsoft News Server | last post by:
Hi, I am currently having a problem with random, intermittent lock ups in my ASP.net application on our production server (99% CPU usage by 3 threads, indefinately). I currently use IIS Debug...
7
2883
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...
9
1985
by: dee | last post by:
Hi I'm about to upload my site and I have switched to release version. Is that enough or do I still need to disable <compilation defaultLanguage="vb" debug="true" /> the debug="true" in the .pdb...
3
2876
by: Steve Franks | last post by:
I'm using Visual Studio 2005 RC and cannot figure out how to produce a "release" build. Am I doing something wrong? I'm wondering if perhaps MS locked out the ability to produce a release build...
2
2667
by: newscorrespondent | last post by:
I have compiled in DEBUG mode but don't get the debug information from StackFrame class. Is there a specific setting I need to use so that information is included for a debug build. Thanks Tom
6
9119
by: Andrew Rowley | last post by:
I am having trouble getting debug and release builds to work properly with project references using C++ .NET and Visual Studio 2003. I created a test solution, with a basic Windows form C++...
7
3627
by: news.microsoft.com | last post by:
I have an asp.net 2.0 project that when I change the build configuration to release I get the following error: Command line error BC2014: the value 'None' is invalid for option 'debug'. If I...
3
1964
by: TBass | last post by:
Hello, Is there a way to get Visual Studio 2003 look to one directory for debug version dlls when set to DEBUG and then to another directory where I store the release version of a dll when set...
0
7398
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7061
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5057
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4716
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3208
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1566
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
428
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.