How to use PrintDebug in my PosSizer?
Author: wbzhang
Creation Date: 9/30/2010 2:32 PM
profile picture

wbzhang

#1
Anyone know how to use PrintDebug in my PosSizer or external DLL? I want to print something in the "Debug and Error message" box.
profile picture

Eugene

#2
profile picture

wbzhang

#3
I tried the following method, but seems it is not working. I cannot found the debug message from either Output window of SharpDevelop or Debug/Error window of Wealth-lab. Did I miss any configuration?

QUOTE:

do the following:

1. Hit Ctrl-W, O to open the Output window (VS 2008 shortcut).
2. Call Trace.WriteLine in your PosSizer:

System.Diagnostics.Trace.WriteLine( whatever_you_wanted_to_send_to_PrintDebug );
profile picture

Eugene

#4
I miss the point of looking for output in the Debug window of Wealth-Lab, after reading the FAQ that says it's not possible.

Nonetheless, the "method" is 100% working in Visual Studio regardless of what may seem - it's a standard debugging feature.
profile picture

Eugene

#5
One thing I can think of is that you inadvertently changed the output to display Build message while running a Debug build. Double check that dropdown list in the Output box.
profile picture

dan_rozenberg

#6
I know that this isn't exactly what you asked for, but you can get MessageBox.Show called from your DLL and it will show up when WL runs it.

http://msdn.microsoft.com/en-us/library/system.windows.forms.messagebox.show.aspx

Its not perfect but maybe it will help! :)
profile picture

Eugene

#7
Don't try this in a loop :)
profile picture

dan_rozenberg

#8
Most true!

But you can always update a string every loop and print it out in the end....

I never said it was pretty :)
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).