Link to home
Start Free TrialLog in
Avatar of GuruVB
GuruVB

asked on

For C++,VB Developers.

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.
Avatar of jmccay
jmccay

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.
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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: https://www.experts-exchange.com/commspt/

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
Avatar of GuruVB

ASKER

I was on vacation so that I couldn't check it. I will check it and will do the needfull.
GuruVB
Thanks for the feedback. I will put this on hold.

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

======
Werner