>不知道用ASP写代码的朋友是不是和我有一样的感受,ASP中最头疼的就是调试程序的时候不方便,我想可能很多朋友都会用这样的方法“response.write ”,然后输出相关的语句来看看是否正确。前几天写了一个千行的页面,里面大概有七八个SUB/FUNCTION,调试的时候用了有三十几个response.write ,天,调试完后把这三十个一个个删除,累! </P># _% c4 x+ }8 W
>今天看到一个ASP中的Debug类(VBS),试用了一下,绝! 1 D' n7 W {$ N, ~1 E) @! [- D# @. T! ?
><!--#INCLUDE FILE="debuggingConsole.asp"-->
>=================================================== </P>
>debuggingConsole.asp </P>
><% % }' h& p- }9 i' X: } F
> private dbg_Enabled , k- `/ [ G9 g
>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! H" f6 e+ B5 p- E* {$ W
> 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>0 o, T9 u' R Y$ j: }% t3 U% S
> dbg_Show_default = "0,0,0,0,0,0,0,0,0,0,0" 9 `! Y7 i0 f) t. j* e7 b$ ~7 E
>
ublic Property Let Enabled(bNewValue) ''[bool] Sets "enabled" to true or false - M& `! M$ j4 H. k. e( X2 `
>
ublic Property Get Enabled ''[bool] Gets the "enabled" value 4 Z8 {0 L3 c8 L3 |: j
>
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 ( V6 x- e* ^- Q* v: s
>
ublic Property Get AllVars ''[bool] Gets if all variables will be displayed.
>'*********************************************************** 0 N& @7 ]5 \' U9 U
> tbl = MakeTable(tbl) 2 E8 Q4 ?: a( p0 w$ L% U" i: O' a, U
>'***********************************************************
rovider",oSQLDB.Properties("
rovider Name") & " Ver: " & oSQLDB.Properties("
rovider Version"))
>'***********************************************************
>'***********************************************************
>'***********************************************************
>'*********************************************************** $ u5 u/ f; h. {& G: X4 r: W
>'Destructor & P3 k, m7 d' Y
>End Class </P><
>%> </P><
>类的说明: </P><
>
>-------------------------------------------------------------------------------- </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><
>-------------------------------------------------------------------------------- & V) A& W4 P) }; M
>public sub===Print (label, output)
>public sub===GrabDatabaseInfo (byval oSQLDB)
>public sub===draw () ) ]4 g; K5 m3 H3 V
>-------------------------------------------------------------------------------- 9 R: b( p8 Q' z6 _3 ~| 欢迎光临 数学建模社区-数学中国 (http://www.madio.net/) | Powered by Discuz! X2.5 |