Solved

For C++,VB Developers.

Posted on 2002-04-08
5
199 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
Comment Utility
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
Comment Utility
0
 
LVL 11

Expert Comment

by:griessh
Comment Utility
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
Comment Utility
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
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
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 learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now