Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to mark code to be compiled only in debug mode?

I've got a try catch (or with in F#) structures all over the code but I don't really need them in debug mode, it's easer for me to debug errors via VS debugger.

So I want to mark try catch codelines to be compiled only in release mode - is it possible or not ?

like image 765
cnd Avatar asked Oct 11 '11 05:10

cnd


1 Answers

You can surround them with:

#if !DEBUG
...
#endif
like image 69
Lasse V. Karlsen Avatar answered Oct 24 '22 15:10

Lasse V. Karlsen