Why Debug.Assert()?

Dec 10, 2007 at 2:42 PM
I've had several instances where a Debug.Assert() call has caused a page to hang since the assert message shows up on the server and obviously nobody's there to click it. I've ended up just commenting out all the Debug.Assert() lines in my code so that the error actually occurs and gets logged so I can see what's happening. Why not just throw an exception so it can be caught, or if nothing else, logged?
Dec 21, 2007 at 7:00 AM
Its useful when developing on the local machine, where either you're using the development web server, or have IIS set to have permissions on the interactive console.

I wouldn't expect the debug versions of the library to be deployed on a production server running in a headless manner.