'*-----------------------------------------------------------------*' ' Debuging Helper Functions function to_str( var ) to_str = "" Dim ttype : ttype = TypeName(var) Dim str_items If IsArray(var) Then Set str_items = CreateObject("Scripting.Dictionary") Dim item For Each item in var str_items(to_str( item )) = 1 Next to_str = to_str & "[" & Join(str_items.Keys, ", ") & "]" Set str_items = Nothing ElseIf IsObject(var) Then If ttype = "Dictionary" Then Dim key Set str_items = CreateObject("Scripting.Dictionary") For Each key In var.Keys pair = to_str(key) & ": " & to_str(var(key)) str_items(pair) = 1 Next to_str = to_str & "{" & Join(str_items.Keys, ", ") & "}" Set str_items = Nothing Else to_str = to_str & "{" & ttype & "}" End If ElseIf IsEmpty(var) Then to_str = to_str & "{empty}" ElseIf IsNull(var) Then to_str = to_str & "{null}" ElseIf ttype = "String" Then 'Replace quotes with doble quotes, and put in quotes to_str = to_str & "{""" & Replace(var, """", """" & """" ) & """}" Else to_str = to_str & var End If end function sub pp(var) Response.Write( to_str(var) ) end sub sub ppl(label, var) Response.Write( label & ":
" & to_str(var) & "" ) end sub sub ppe(var) all_tags = Array("address", "applet", "area", "a", "base", "basefont", "big", "blockquote", "body", "br", "b", "caption", "center", "cite", "code", "dd", "dfn", "dir", "div", "dl", "dt", "em", "font", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "hr", "html", "img", "input", "isindex", "i", "kbd", "link", "li", "map", "menu", "meta", "ol", "option", "param", "pre", "p", "samp", "script", "select", "small", "strike", "strong", "style", "sub", "sup", "table", "td", "textarea", "th", "title", "tr", "tt", "ul", "u", "var", "table", "table", "table", "table", "table") close_tags = "" & Join(all_tags, ">") & ">" Response.Write close_tags & "