Helps need on adding debug info to release mode so to debug release code 
Author Message
 Helps need on adding debug info to release mode so to debug release code

Hi there,

I've encountered a bug which only happens in release mode.  and I'm trying
to debug it in release mode.  The best way I could think of is adding debug
info into release project and debug it in IDE(MS VC++6).  Any ideas what
changes should I make to the project setting?

Thanks in advance.

WWang



Tue, 14 Oct 2003 15:27:02 GMT  
 Helps need on adding debug info to release mode so to debug release code
Go into the project settings and change the following:

C/C++ tab: In the general category, specify debug info as
something other than "None" (e.g. "Program Database")

Link tab: In the general category, check the
"Generate debug info" box

  /Claes


Quote:
> Hi there,

> I've encountered a bug which only happens in release mode.  and I'm trying
> to debug it in release mode.  The best way I could think of is adding
debug
> info into release project and debug it in IDE(MS VC++6).  Any ideas what
> changes should I make to the project setting?

> Thanks in advance.

> WWang



Tue, 14 Oct 2003 16:35:19 GMT  
 Helps need on adding debug info to release mode so to debug release code
A problem I've had in the past is that I've removed code by using assert
(ASSERT, ATLASSERT, etc). Also, subtle timing issues can crop up.

Dirk


Quote:
> Hi there,

> I've encountered a bug which only happens in release mode.  and I'm trying
> to debug it in release mode.  The best way I could think of is adding
debug
> info into release project and debug it in IDE(MS VC++6).  Any ideas what
> changes should I make to the project setting?

> Thanks in advance.

> WWang



Wed, 15 Oct 2003 00:19:03 GMT  
 Helps need on adding debug info to release mode so to debug release code
Hello William,

In addition to Claes answer, add "/opt:ref" in Project Settings/Link/Project
Options edit box. It will strip unnecessary functions. I also recommend you
to redistribute only such "release debug" binaries and keep for each build
PDB files. There are no differences between release and "release debug"
binaries except tens bytes at the end with path to PDB file.

--
Best regards,
Vadim Melnik,
{*filter*} Consultant.
_____________________________
http://www.*-*-*.com/


Quote:
> Go into the project settings and change the following:

> C/C++ tab: In the general category, specify debug info as
> something other than "None" (e.g. "Program Database")

> Link tab: In the general category, check the
> "Generate debug info" box

>   /Claes



> > Hi there,

> > I've encountered a bug which only happens in release mode.  and I'm
trying
> > to debug it in release mode.  The best way I could think of is adding
> debug
> > info into release project and debug it in IDE(MS VC++6).  Any ideas what
> > changes should I make to the project setting?

> > Thanks in advance.

> > WWang



Fri, 17 Oct 2003 07:21:12 GMT  
 Helps need on adding debug info to release mode so to debug release code
Thanks very much for the help.  I'll try it out.

WWang

Quote:
> Hello William,

> In addition to Claes answer, add "/opt:ref" in Project

Settings/Link/Project
Quote:
> Options edit box. It will strip unnecessary functions. I also recommend
you
> to redistribute only such "release debug" binaries and keep for each build
> PDB files. There are no differences between release and "release debug"
> binaries except tens bytes at the end with path to PDB file.

> --
> Best regards,
> Vadim Melnik,
> {*filter*} Consultant.
> _____________________________
> http://www.*-*-*.com/



> > Go into the project settings and change the following:

> > C/C++ tab: In the general category, specify debug info as
> > something other than "None" (e.g. "Program Database")

> > Link tab: In the general category, check the
> > "Generate debug info" box

> >   /Claes



> > > Hi there,

> > > I've encountered a bug which only happens in release mode.  and I'm
> trying
> > > to debug it in release mode.  The best way I could think of is adding
> > debug
> > > info into release project and debug it in IDE(MS VC++6).  Any ideas
what
> > > changes should I make to the project setting?

> > > Thanks in advance.

> > > WWang



Fri, 17 Oct 2003 08:44:14 GMT  
 Helps need on adding debug info to release mode so to debug release code
Claes,

Thanks for the help.

I've tried as you've suggested and I seems be able to step in to debug my
release version under IDE.  Step, variable watch function mostly works.  But
in some places:
1. when I do "watch variable", it pops up with an err msg says something
like "CX0017" Error : symbol "XXX" not found.
2. when I do "Step Over F10", what's happening is not what I'm expected.
Just like my source code is not matching with binary.  (I did a "Clean" and
"Rebuild all" so to make sure it's in sync)

Any idea what might be missing? or what's have I done wrong?

WWang


Quote:
> Go into the project settings and change the following:

> C/C++ tab: In the general category, specify debug info as
> something other than "None" (e.g. "Program Database")

> Link tab: In the general category, check the
> "Generate debug info" box

>   /Claes



> > Hi there,

> > I've encountered a bug which only happens in release mode.  and I'm
trying
> > to debug it in release mode.  The best way I could think of is adding
> debug
> > info into release project and debug it in IDE(MS VC++6).  Any ideas what
> > changes should I make to the project setting?

> > Thanks in advance.

> > WWang



Fri, 17 Oct 2003 09:38:32 GMT  
 Helps need on adding debug info to release mode so to debug release code
Might be a symbol or block of code that only exists in debug or
something. Since a release build doesn't define _DEBUG
(or DEBUG) anything protected by #ifdef _DEBUG
(or #ifdef DEBUG) wont be included when compiling.

Note that some macros (e.g. ATLASSERT) are protected
by debug defines so they wont work. For example the following
is an error:

ATLASSERT(SUCCEEDED(CoInitialize(NULL)));

  /Claes


Quote:
> Claes,

> Thanks for the help.

> I've tried as you've suggested and I seems be able to step in to debug my
> release version under IDE.  Step, variable watch function mostly works.
But
> in some places:
> 1. when I do "watch variable", it pops up with an err msg says something
> like "CX0017" Error : symbol "XXX" not found.
> 2. when I do "Step Over F10", what's happening is not what I'm expected.
> Just like my source code is not matching with binary.  (I did a "Clean"
and
> "Rebuild all" so to make sure it's in sync)

> Any idea what might be missing? or what's have I done wrong?

> WWang



> > Go into the project settings and change the following:

> > C/C++ tab: In the general category, specify debug info as
> > something other than "None" (e.g. "Program Database")

> > Link tab: In the general category, check the
> > "Generate debug info" box

> >   /Claes



> > > Hi there,

> > > I've encountered a bug which only happens in release mode.  and I'm
> trying
> > > to debug it in release mode.  The best way I could think of is adding
> > debug
> > > info into release project and debug it in IDE(MS VC++6).  Any ideas
what
> > > changes should I make to the project setting?

> > > Thanks in advance.

> > > WWang



Sun, 19 Oct 2003 16:17:12 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Code works in debug mode but not in release mode

2. Help Me wahts Diff between debug mode and release mode in VC++

3. Works in Debug mode but not in Release mode

4. MIDL compiler fails during release mode but works fine in debug mode

5. Works in Debug Mode crahses in Release Mode

6. Run time Release mode error but no Debug mode error

7. Quiet NaNs, release mode and debug mode

8. Complining one project in release mode and another in debug mode

9. Program not work at release mode but work at debug mode

10. Page fault when compile using Release mode but not Debug mode

11. Program runs fine in debug mode, but crashes in release mode

12. link error after changing from debug mode to release mode

 

 
Powered by phpBB® Forum Software