How to automatically comment out code on debug mode RRS feed

  • Question

  • User-697484618 posted


    I know how to automate different web.config files using debug and release and I'm wondering if something similar is possible in all file types.

    In particular I need to comment out some code in a mvc view e.g. 'Google Analytics' for staging environment.

    Any approach is appreciated

    Wednesday, October 16, 2013 6:39 AM


  • User1470282298 posted


    in MVC you can do that:

      #if DEBUG

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, October 16, 2013 12:24 PM