A coisa mais problemática no ASP é que é inconveniente depurar o programa. Acho que muitos amigos podem usar esse método "Response.Write" e, em seguida, produzir declarações relevantes para ver se está correto. Alguns dias atrás, escrevi uma página de 1.000 linhas, que contém cerca de sete ou oito sub/funções. Eu usei mais de 30 respostas. Escreva ao depurar. Ah, depois de depuração, eu excluí estes 30 um por um. Eu estava cansado!
Hoje eu vi uma aula de depuração (VBS) no ASP. Eu tentei, foi incrível!
Como usar é muito simples:
test.asp
<!-#incluirfile = "DebuggingConsole.asp"->
<%
output = "xxxx"
SetDebugSt = newDebuggingConsole
Debugstr.enabled = true
Debugstr.print "Valor da saída do parâmetro", saída
'' ...
Debugstr.Draw
SetDebugSt = nada
%>
=========================================================================
DebuggingConsole.asp
<%
ClassDebuggingConsole
privatebg_enabled
privatebg_show
privatebg_requesttime
privatebg_finishtime
privatebg_data
privatebg_db_data
privatebg_allvars
privatebg_show_default
Instalação privada (2)
'' Construktor => setThEDefaultValues
Privatesubclass_initialize ()
dbg_requesttime = agora ()
dbg_allvars = false
SetDbg_data = server.createObject ("scripting.dictionary")
Divsets (0) = "<tr> <tdstyle = '' cursor: hand; '' onclick =" "javascript: if (document.getElementById ('' dados#sectName#''). Style.display == 'nenhum' '') {document.get ElementById ('' Data#SectName#''). Style.Display = '' Block '';} else {document.getElementById ('' Data#SectName#''). Style.Display = '' Nenhum '' ';} ""> <divid = Sect#S. EctName#style = "" Fonte-peso: negrito; cursor: Hand; Background:#7ea5d7; cor: branco; preenchimento-esquerda: 4; estofamento-direito: 4; preenchimento de preenchimento: 2; ""> |#título#| <divid = Dados#sectName#style = "" Cursor: text; exibir: nenhum; fundo: #fffff; padding-left: 8; "" onclick = "" window.event.cancelbubble = true; ""> |#dados#| </div> | "
DivSsets (1) = "<tr> <Td> <divid = seita#sectName#style =" "Fonte-peso: negrito; cursor: Hand; Background:#7ea5d7; cor: branco; preenchimento-esquerda: 4; preenchimento de preenchimento: 4; p Adicionando-Bottom: 2; "" OnClick = "" JavaScript: if (document.getElementById ('' dados#sectName#''). style.display == '' '' '' ') {document.getElementById (' ' #SectName#''). style.display = '' Block '';} else {document.getElementById ('' Data#sectName#''). style.display = '' none '' ';} ""> |#title#| <divid = dados#s EctName#Style = "" Cursor: Text; Display: Block; Background: #FFFFF; Padding-Left: 8; "" OnClick = "" Window.Event.CancelBubble = true; ""> |#Dados#| </div> | "
Divsets (2) = "<tr> <t>> <divid = seita#sectName#style =" "Background:#7ea5d7; cor: Lightsteelblue; preenchimento-left: 4; Right-right: 4; padd ing-Bottom: 2; "> |#Título#| <divid = dados#sectName#style =" "Display: Nenhum; Background: Lightsteelblue; Padding-Left: 8" "> |#Dados#| </div> |"