I’m trying to use System.Diagnostics.Debug.WriteLine and so far have been completely unable. Stepping through shows that it just steps over that code (kind of miss Delphi’s dots to show you which lines actually got compiled into your code). In digging into the issue, I find that for regular VS 2012 they say to make sure the “Define DEBUG constant” property is checked. http://msdn.microsoft.com/en-us/library/vstudio/ms164714.aspx
In VS 2012, this is in the project properties on the Build page:
But I can’t find this anywhere in Oxygene (VS Shell version). Is anyone using System.Diagnostics.Debug.WriteLine successfully in their Oxygene projects (especially in the Shell version)? Did you have to do anything else special to turn it on?
My Build configuration is set to Debug and when I Start it, it says “Debug” out beside it and I can step through the code. So it seems like everything but that DEBUG constant is set.
Thanks! Don’t know why that wasn’t obvious to me. It seems like there’s so much more “hidden” stuff in VS projects compared to Delphi that I guess I assumed it controlled something in some file somewhere behind the scenes. Debug.WriteLine works for me now.
Have you had any luck redirecting console output to the Output window? I still can’t get that to work. It’s not a huge deal but it bugs me.
I considered it. Thing is that it’s one or the other. I cannot make both a console show AND have output to the output panel. Consoles have added advantages of supporting colors and stuff.
I just meant if you try it in a test app, does it work AT ALL? I haven’t been able to make it do so, even with the “Capture console output” box checked.