DesktopX script debugging

Anybody have any tips for how to debug DesktopX scripts? I suppose I can just use popup debug messages - is that what most folks use?
1,310 views 2 replies
Reply #1 Top
I think so.

You can always check in the stardock newsgroups in desktopx section and usually you will receive help if your code isn't working right.
Reply #2 Top
scottsh: I tend to have an edit control object called debugbox on the desktop and a sub like this:

sub debugadd(texttoadd,clear)

if clear=true then
control.text=""
else
control.Text = Control.text & Vbcrlf & texttoadd
end if

end sub

then in any object I use something like:

DesktopX.ScriptObject("debugbox").debugadd("val1 = " & val1,False)

if val1 = 3 then
' do something
else
' do something else
end if

which would put :

val1 = 3

in the edit control

Remember to set the edit control to multiline first though or it'll be a mess

This method is a lot less problematic than msgboxes and you can look at the results of a long loop and even copy text from the edit control and plonk it in notepad and compare what you got to what you expected.
[Message Edited]