不知道用ASP写代码的朋友是不是和我有一样的感受,ASP中最头疼的就是调试程序的时候不方便,我想可能很多朋友都会用这样的方法“response.write ”,然后输出相关的语句来看看是否正确。前几天写了一个千行的页面,里面大概有七八个SUB/FUNCTION,调试的时候用了有三十几个response.write ,天,调试完后把这三十个一个个删除,累!
今天看到一个ASP中的Debug类(VBS),试用了一下,绝!
使用方法很简单:
以下为引用的内容:
test.ASP <!--#INCLUDE FILE="debuggingConsole.ASP"--> =================================================== debuggingConsole.ASP <% private dbg_Enabled ‘Construktor => set the default values |
{[csc:pagelist]}
dbg_Show_default = "0,0,0,0,0,0,0,0,0,0,0" Public Property Let Enabled(bNewValue) ‘‘[bool] Sets "enabled" to true or false Public 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 Public Property Let AllVars(bNewValue) ‘‘[bool] Sets wheather all variables will be displayed or not. true/false ‘****************************************************************************************************************** ‘****************************************************************************************************************** ValidLabel = lbl ‘****************************************************************************************************************** |
{[csc:pagelist]}
Next tbl = MakeTable(tbl) ‘****************************************************************************************************************** |