How can I find out if my app runs in debug or in release mode?


  • I tried to check "if Debug" but its an object in both Release and Debug mode. So how can I check if the app is running in the debug solution configuration?
    Thursday, November 17, 2011 10:21 AM

All replies

  • I don't believe javascript compiles any different in the Debug mode.  The Debug object simply lets you do Debugging things and exists regardless of the compile flag.

    What are you trying to accomplish and why is this necessary for your code?

    Jeff Sanders (MSFT)
    Thursday, November 17, 2011 9:29 PM
  • I would display some debug outputs on the canvas if runnning in debug mode
    Friday, November 18, 2011 6:05 AM
  • I think you can use command arguments to judge if it is in the Debug mode.
    Monday, November 21, 2011 9:52 AM
  • Ah that would be an idea. I will try that out!
    Monday, November 21, 2011 10:06 AM
  • Hi Phil,

    Why not simply run in the debugger and output debugger commands, would that meet your needs?

    Debug.writeln("Your message here"); is an effective method I use all the time.


    Jeff Sanders (MSFT)
    Monday, November 21, 2011 3:51 PM
  • That's one solution. But I would like to have a nice jQuery Dialog open with various debug informations in it. But I will see what I actually need once the project gets complex :)

    Monday, November 21, 2011 4:02 PM