• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 209
  • Last Modified:

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.
0
GuruVB
Asked:
GuruVB
1 Solution
 
jmccayCommented:
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
 
griesshCommented:
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
 
GuruVBAuthor Commented:
I was on vacation so that I couldn't check it. I will check it and will do the needfull.
0
 
griesshCommented:
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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now