473,587 Members | 2,524 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**********@s bcglobal.net)
Jul 19 '05 #1
1 5375
Clifton M. Bean wrote in
news:hp******** ********@newssv r24.news.prodig y.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
11110
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 before displaying stuff to the browser. Then, step through each individual piece of code, etc, whilst having the output mirrored to either another...
11
2064
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 _________________________________________________________________ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail
4
2369
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 reason, in only one of them, the JIT debugger doesn't seem to be working. (At least I asssume this is a JIT debugger issue.) Anyways, in all my other...
25
4281
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 cost way to do sophisticated debugging in IE6 other than to use the debugger described below, which is horribly documented otherwise. I feel...
1
2998
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 debugging a Java stored procedure. Well, I never got the debugger to work despite my best efforts - see posts earlier this week - so now I'd like to...
2
4170
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
2956
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 perldb) or "run" (gdb) command. I was pleasantly pleased discover how easy though it was patch pdb.py and pdb.doc; my patch for this is here:...
3
2283
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 code and debugging output later in this post. I've seen a number of threads with similar problems that I'll address below. The one that's the...
3
1428
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 the code below: *Analysing exam results*/ #include <stdio.h> int main() {
0
7843
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8340
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7967
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8220
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6621
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3840
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2353
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 we have to send another system
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1185
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.