>不知道用ASP写代码的朋友是不是和我有一样的感受,ASP中最头疼的就是调试程序的时候不方便,我想可能很多朋友都会用这样的方法“response.write ”,然后输出相关的语句来看看是否正确。前几天写了一个千行的页面,里面大概有七八个SUB/FUNCTION,调试的时候用了有三十几个response.write ,天,调试完后把这三十个一个个删除,累! </P>
>今天看到一个ASP中的Debug类(VBS),试用了一下,绝! 6 b; g9 v+ H1 X( y/ ~: O
><!--#INCLUDE FILE="debuggingConsole.asp"-->
>=================================================== </P>
>debuggingConsole.asp </P>* e* m8 J. m7 K# m6 p \. @" Z0 m
><% : v6 Z! Z* o8 z" Q
> private dbg_Enabled 0 S- v0 n) L1 @& D6 n
>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>! y! Q" F* F- d3 f
> 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" , b6 d+ z4 C. y$ g9 A2 Z0 l2 v
>
ublic Property Let Enabled(bNewValue) ''[bool] Sets "enabled" to true or false
>
ublic Property Get Enabled ''[bool] Gets the "enabled" value - d9 \- p8 C5 l8 ^: w$ U, `
>
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. ' i* f" R2 Y0 W
>'***********************************************************
> tbl = MakeTable(tbl) % @8 w$ z% ~# f" F7 I- Q" r( _/ I
>'*********************************************************** ' B" ]% L% O1 s! k2 e2 Z
rovider",oSQLDB.Properties("
rovider Name") & " Ver: " & oSQLDB.Properties("
rovider Version"))
>'***********************************************************
>'*********************************************************** * R; }3 @% |2 `0 i2 ]; o8 z
>'***********************************************************
>'***********************************************************
>'Destructor 1 K- c6 S( O/ y. Q0 P7 [. Y7 U
>End Class </P><
>%> </P><
>类的说明: </P><
>
>-------------------------------------------------------------------------------- </P><
>
ublic Properties </P><
>
roperty Let Enabled(bNewValue)===[bool] Sets "enabled" to true or false % O. @1 T) o+ c8 f; W: r0 H) f
>
roperty Get AllVars===[bool] Gets if all variables will be displayed. </P><
>--------------------------------------------------------------------------------
>public sub===Print (label, output) ! ]0 N- w$ @1 \/ v( a0 v! H$ j! ^/ U0 _
>public sub===GrabDatabaseInfo (byval oSQLDB)
>public sub===draw ()
>-------------------------------------------------------------------------------- 5 M! |9 }0 J* N B/ a| 欢迎光临 数学建模社区-数学中国 (http://www.madio.net/) | Powered by Discuz! X2.5 |