>不知道用ASP写代码的朋友是不是和我有一样的感受,ASP中最头疼的就是调试程序的时候不方便,我想可能很多朋友都会用这样的方法“response.write ”,然后输出相关的语句来看看是否正确。前几天写了一个千行的页面,里面大概有七八个SUB/FUNCTION,调试的时候用了有三十几个response.write ,天,调试完后把这三十个一个个删除,累! </P>: l2 G S/ Q$ m/ d5 f! R$ G6 l
>今天看到一个ASP中的Debug类(VBS),试用了一下,绝!
><!--#INCLUDE FILE="debuggingConsole.asp"--> * W: v8 w: C) ~/ ?% t# R: n
>=================================================== </P>
>debuggingConsole.asp </P>+ y& q" ^* S4 K9 o( ~, y; d) [
><%
> private dbg_Enabled ' f9 N! \; F# }& d, c+ z
>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>
> 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>- u1 Y! G" t3 T+ E; ^: m8 I
> dbg_Show_default = "0,0,0,0,0,0,0,0,0,0,0" ! @8 h+ O& a7 r/ \, D. e9 ~- u
>
ublic Property Let Enabled(bNewValue) ''[bool] Sets "enabled" to true or false
>
ublic Property Get Enabled ''[bool] Gets the "enabled" value
>
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 ; P' X3 x. \( h
>
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 * T1 c8 }$ b: ]: c9 @! i. U
>
ublic Property Get AllVars ''[bool] Gets if all variables will be displayed.
>'***********************************************************
> tbl = MakeTable(tbl)
>'*********************************************************** S$ M! O0 ?! ]0 k/ @8 h1 ]0 K
rovider",oSQLDB.Properties("
rovider Name") & " Ver: " & oSQLDB.Properties("
rovider Version")) , V- s( m, q" z5 v
>'*********************************************************** ( M. N0 u' R2 q# k0 W7 L/ x
>'*********************************************************** ! m8 G+ s: P2 R* X8 T0 }
>'*********************************************************** 1 I5 q9 |) V2 i( s$ A3 q5 s6 Q
>'***********************************************************
>'Destructor
>End Class </P><
>%> </P><
>类的说明: </P><
>. s. N& W/ D4 N8 O& O4 d
>-------------------------------------------------------------------------------- </P><
>
ublic Properties </P><
>
roperty Let Enabled(bNewValue)===[bool] Sets "enabled" to true or false + M% C( @! _% b0 P
>
roperty Get AllVars===[bool] Gets if all variables will be displayed. </P><
>--------------------------------------------------------------------------------
>public sub===Print (label, output) h. s0 V: f7 K* y2 ^/ }
>public sub===GrabDatabaseInfo (byval oSQLDB)
>public sub===draw ()
>-------------------------------------------------------------------------------- | 欢迎光临 数学建模社区-数学中国 (http://www.madio.net/) | Powered by Discuz! X2.5 |