Quick one - visual studio  - Release version should hide extra debug info

Posted on 2005-04-13
Last Modified: 2010-04-16
Hi all,
I have a Windows Application and we have a very simple interface.
We have a lot of extra info that we display when we are testing the solution.

At the moment we just use a boolean in the code to say whether to display extra panels or not.
I would like to take this out of the code and have it as an option somewhere.
I have seen that you can have debug versions and release versions of applications.
So i would simply like to set a bool flag to false if I compile a release to turn of all the extra info.

Any ideas?
Question by:CoreSupport
    LVL 11

    Expert Comment

    in your constructor or main or whereever you init that boolean put sometrhing like this:

    #ifndef DEBUG
    yourBoolean = false;
    yourBoolean = true;

    LVL 3

    Accepted Solution


    #if DEBUG
          showPanels = true;
          showPanels = false;

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
    Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    754 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

    20 Experts available now in Live!

    Get 1:1 Help Now