Detect if application is run from inside visual studio



Hi,

I am working on an application that installs a system wide keyboard
hook. I do not want to install this hook when I am running a debug
build from inside the visual studio (or else it would hang the studio
and eventually the system), and I can avoid this by checking if the
DEBUG symbol is defined.

However, when I debug the _release_ version of the application, is
there a way to detect that it has been started from inside visual
studio to avoid the same problem? It is very annoying to have to
restart the studio/the computer, just because I had been working on
the release build, and want to fix some bugs using the debugger having
forgotten to switch back to the debug build.

Thanks in advance,
Michael Donn
.



Relevant Pages

  • Re: urgent problem that I want to have a comment about
    ... This dll is run on windows server 2003. ... studio 6.0 on this server. ... doing tests with debug build is a *must*. ...
    (microsoft.public.vc.mfc)
  • "no symbols loaded"
    ... When I debug my application I get "no symbols loaded" ...
    (microsoft.public.dotnet.general)
  • VS 2003 hangs when I try to debug
    ... Now all of a sudden when I try to debug, ... project compiling OK, but then the form doesn't come up, and the studio ... hangs. ... uninstall aol, etc, etc. I've even deleted and re-installed the 1.1 ...
    (microsoft.public.vsnet.ide)
  • Re: Remove VS general debugger
    ... When, for example, I get a java error on a web page, Visual ... studio keeps asking me if I want to debug the application. ... debugger to come up. ...
    (microsoft.public.vstudio.general)
  • Re: How to build an image that works with VS.2003
    ... Why don't you output some well placed retail messages in your application, ... I would like to debug the application line by line in the ... > Is it possible to debug in Visual Studio? ... I find Platform Builder and the tools that come with it good ...
    (microsoft.public.windowsce.platbuilder)

Quantcast