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

Home Posts Topics Members FAQ

How Do You Turn Off the Debugger?

In C++ within Visual Studio as well as within UNIX ...

I need to turn off/on debug statements. I do not want to comment out these
statements.

I am guessing that I can use:

#ifdef DEBUG
.... statements ...
#endif

I use DEBUG as an identifier.

Where should I define this identifier? Can it be done within a makefile for
UNIX? Or in some text field in Project Settings in Visual Studio 6
Environment?

..... or is this there a better way?

Thank you in advance.
Kathryn (ka**********@sbcglobal.net)
Jul 19 '05 #1
1 5369
Clifton M. Bean wrote in
news:hp****************@newssvr24.news.prodigy.com :
In C++ within Visual Studio as well as within UNIX ...

I need to turn off/on debug statements. I do not want to comment out
these statements.

I am guessing that I can use:

#ifdef DEBUG
.... statements ...
#endif

I use DEBUG as an identifier.

Where should I define this identifier? Can it be done within a
makefile for UNIX? Or in some text field in Project Settings in
Visual Studio 6 Environment?

.... or is this there a better way?


define NDEBUG on the compilers comand line -DNDEBUG (*) this has
the advantage that it will turn off the assert() macro from <cassert>.
In your development enviroment you will have to find the the correct
place to make such a define.

For things not covered by assert() use:

#ifndef NDEBUG
// debugging code here
#endif

or if you like to type alot:

#if !defined( NDEBUG )
// debugging code here
#endif

(*) Not all compilers will use this syntax (just most :), check
your compilers documentation.

Rob.
--
http://www.victim-prime.dsl.pipex.com/
Jul 19 '05 #2

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

Similar topics

6
11093
by: jonathan | last post by:
everyone, I'd like to be able to debug php scripts on the command line, going through the browser. In other words, set up the debugger to listen and then type in a url and have the code stop...
11
2058
by: Ziaran _ | last post by:
I have written a new debugger. I think people will find it useful. Where can I post it for people to download? Thanks, Nir _________________________________________________________________...
4
2363
by: Chuck Ritzke | last post by:
Hi, I've been using VS for a number of projects and the debugger has worked as advertised until now. I have a desktop solution with three projects, two of which are class modules. For some...
25
4253
by: Jeff | last post by:
Use the MS Script Editor included free with MS Office 2002 and above, for debugging Internet Explorer (IE). This subject is of great interest to many JS developers, as there is no obvious, low...
1
2991
by: Rhino | last post by:
Is there any way to install the IBM Distributed Debugger V9.2 on Windows XP without first uninstalling DB2? I installed the IBM Distributed Debugger V9.2 on my Windows XP box in the hopes of...
2
4161
by: Atul | last post by:
Hi, How can I "disable script debugger" programmatically using C#? Its similar action when we check the check box from IE (Tools | Internet Options...| Advanced). Any ideas??? Thanks Atul
18
2944
by: R. Bernstein | last post by:
Okay, a bit of an exaggeration. Recently, I've been using Python more seriously, and in using the debugger I think one of the first things I noticed was that there is no "restart" ("R" in...
3
2276
by: Doug | last post by:
I'm having problems w/ the VS2005 debugger with C#. It blows past any breakpoints in even the simplest "Hello World" console application. I can't do any step-by-step debugging. I've provided the...
3
1425
by: wissywise | last post by:
Hi all, I have written some codes in "C" but each time I tried to run the code after it has been compiled, I get a message telling me to turn the deburger on. I tried but no progress. An example...
0
7260
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
7384
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,...
0
7539
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...
0
5686
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5089
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
4746
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
1596
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
802
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
456
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.