>不知道用ASP写代码的朋友是不是和我有一样的感受,ASP中最头疼的就是调试程序的时候不方便,我想可能很多朋友都会用这样的方法“response.write ”,然后输出相关的语句来看看是否正确。前几天写了一个千行的页面,里面大概有七八个SUB/FUNCTION,调试的时候用了有三十几个response.write ,天,调试完后把这三十个一个个删除,累! </P>4 K0 r7 |$ O' }+ l3 T" b
>今天看到一个ASP中的Debug类(VBS),试用了一下,绝!
><!--#INCLUDE FILE="debuggingConsole.asp"--> " X% G1 |6 @- [9 A* m
>=================================================== </P>7 @$ Q! S3 }/ v6 K2 ^$ j& J
>debuggingConsole.asp </P>, R- [- [# i: m, ^ X) T' f" t
><%
> private dbg_Enabled 1 Q( j+ V$ E6 c* ~" S m2 ^
>DivSets(0) = "<TR><TD style='cursor:hand;' onclick=""javascript:if (document.getElementById('data#sectname#').style.display=='none'){document.getElementById('data#sectname#').style.display='block';}else{document.getElementById('data#sectname#').style.display='none';}""><DIV id=sect#sectname# style=""font-weight:bold;cursor:hand;background:#7EA5D7;color:white;padding-left:4;padding-right:4;padding-bottom:2;"">|#title#| <DIV id=data#sectname# style=""cursor:text;display:none;background:#FFFFFF;padding-left:8;"" onclick=""window.event.cancelBubble = true;"">|#data#| </DIV>|</DIV>|" </P>
> DivSets(1) = "<TR><TD>( s' \* e/ M# W5 e8 C) ?7 J
> DivSets(2) = "<TR><TD><DIV id=sect#sectname# style=""background:#7EA5D7;color:lightsteelblue;padding-left:4;padding-right:4;padding-bottom:2;"">|#title#| <DIV id=data#sectname# style=""display:none;background:lightsteelblue;padding-left:8"">|#data#| </DIV>|</DIV>|" </P>
> dbg_Show_default = "0,0,0,0,0,0,0,0,0,0,0"
>
ublic Property Let Enabled(bNewValue) ''[bool] Sets "enabled" to true or false
>
ublic Property Get Enabled ''[bool] Gets the "enabled" value 9 D* J2 c5 A3 \6 X) S# O8 r
>
ublic Property Let Show(bNewValue) ''[string] Sets the debugging panel. Where each digit in the string represents a debug information pane in order (11 of them). 1=open, 0=closed
>
ublic Property Get Show ''[string] Gets the debugging panel.
>
ublic Property Let AllVars(bNewValue) ''[bool] Sets wheather all variables will be displayed or not. true/false
>
ublic Property Get AllVars ''[bool] Gets if all variables will be displayed.
>'*********************************************************** 7 i1 ], e* N) C) C: p
> tbl = MakeTable(tbl) / o9 V/ D5 A, k8 L" |7 d
>'*********************************************************** : ^. H" y0 Z4 [& W5 q, K
rovider",oSQLDB.Properties("
rovider Name") & " Ver: " & oSQLDB.Properties("
rovider Version")) $ \# ~( ^9 e- o- W$ C
>'*********************************************************** ( @3 {, J8 M; T# {) A& x
>'*********************************************************** : F: `: N+ n. _- M1 ?
>'*********************************************************** ) Q) |% C* f0 e" k, ?- |* h. m
>'*********************************************************** 4 l- [# A; Y0 t
>'Destructor
>End Class </P><
>%> </P><
>类的说明: </P><
>* ]1 M" f1 U5 G9 F# y# R# U7 P1 X
>-------------------------------------------------------------------------------- </P><
>
ublic Properties </P><
>
roperty Let Enabled(bNewValue)===[bool] Sets "enabled" to true or false
>
roperty Get AllVars===[bool] Gets if all variables will be displayed. </P><
>--------------------------------------------------------------------------------
>public sub===Print (label, output) # \9 J8 H1 j' Y; T, L
>public sub===GrabDatabaseInfo (byval oSQLDB)
>public sub===draw ()
>-------------------------------------------------------------------------------- 0 j* Z0 W' K, [. E/ u& K) _2 G$ \| 欢迎光临 数学建模社区-数学中国 (http://www.madio.net/) | Powered by Discuz! X2.5 |