Solved

For C++,VB Developers.

Posted on 2002-04-08
5
203 Views
Last Modified: 2010-04-02
How to detect in VC++ code that USER is debugging the code? i.e User is in NSDEV Environment debugging with F10, F11 keys etc.
0
Comment
Question by:GuruVB
5 Comments
 
LVL 1

Expert Comment

by:jmccay
ID: 6925419
Can you clirfy this question a little?  Are you looking for information regarding the Macros?  I can tell you about Visual C++.  In VC++ 5.0 and 6.0 (I haven't tried 7.0 but I assume it's the same), "_DEBUG" is defined (without the quotes) when the current program is compiled in debug mode.  If you are talking about the C++ code and not the macros, you can use this with other Preprocessor directives in the code like this:

#ifdef _DEBUG
   // put your debug code here
#else
   // put you normal code here fr Release mode
#endif

or:

#ifndef _DEBUG
   // Put your release code here
#else
   // Put you debug here
#endif

   I would look up the #ifdef/#else/#endif for information.  I hope this helps.  I don't know enough about VB to tell you what to do.
0
 
LVL 86

Accepted Solution

by:
jkr earned 100 total points
ID: 6925854
0
 
LVL 11

Expert Comment

by:griessh
ID: 6960608
Dear GuruVB

I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. You can always request to keep this question open. But remember, experts can only help you if you provide feedback to their questions.
Unless there is objection or further activity,  I will suggest to accept

     "jkr"

comment(s) as an answer.

If you think your question was not answered at all, you can post a request in Community support (please include this link) to refund your points. The link to the Community Support area is: http://www.experts-exchange.com/commspt/

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
0
 

Author Comment

by:GuruVB
ID: 6968958
I was on vacation so that I couldn't check it. I will check it and will do the needfull.
0
 
LVL 11

Expert Comment

by:griessh
ID: 6970319
GuruVB
Thanks for the feedback. I will put this on hold.

I envy you! I hope you had a great time ...

======
Werner
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Grammars for C C++ and java 1 122
c++ getting the first 10 characters of a char* string 11 94
Header of docx file 17 103
How can i compile this github project?? 2 85
When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question