Creo que muchos amigos pueden usar este método "Response.Write" y luego emitir declaraciones relevantes para ver si es correcto. Hace unos días, escribí una página de Thousand Lines, que contiene aproximadamente siete u ocho sub/funciones. Usé más de treinta respuestas. Escribe al depurar. ¡Dios mío, después de la depuración, elimine estos treinta uno por uno, lo cual es agotador!
Hoy vi una clase de depuración (VBS) en ASP. Lo probé, ¡fue increíble!
Cómo usar es muy simple:
test.asp
La copia del código es la siguiente:
<!-#include file = "debuggingconsole.asp"->
<%
output = "xxxx"
Establecer debugStr = nuevo debuggingconsole
debugstr.enabled = True
DebugStr.print "Valor de la salida de parámetros", salida
'...
debugstr.draw
Establecer debugstr = nada
%>
================================================================================
depurgingconsole.asp
La copia del código es la siguiente:
<%
CONSOLO DE LA CLASE
privado dbg_enabled
DBG_SHOW privado
DBG_REQUESTTIME privado
privado dbg_finishtime
DBG_DATA privado
DBG_DB_DATA privado
DBG_Allvars privado
privado dbg_show_default
divisas privadas (2)
'Construktor => Establecer los valores predeterminados
Sub class_initialize () privado ()
dbg_requesttime = ahora ()
dbg_allvars = falso
Establecer dbg_data = server.createObject ("scripting.dictionary")
Divsets (0) = "<tr> <td style = 'cursor: hand;' onClick = "" javascript: if (document.getElementById ('data#sectname#'). id = sect#sectname#style = "" Font-Weight: Bold; Cursor: Hand; Background:#7EA5D7; Color: White; Padding-Left: 4; Padding-Right: 4; Padding-Bottom: 2; ""> |#Título#| onClick = "" window.event.cancelBubble = true; "> |#datos#| </div> | "
Divsets (1) = "<tr> <td> <div id = sect#sectname#style =" "Font-Weight: Bold; Cursor: Hand; Background:#7ea5d7; color: White; Padding-Left: 4; Right-Right: 4; Padding-Bottom: 2;" "OnClick =" "Javascript: if if: If (document.getElementById ('data#sectname#'). style.display == 'none') {document.getElementById ('data#sectname#'). style.display = 'block';} else {document.getElementByid ('data#sectname#'). style.display = 'none';}> |#Title#| id = data#sectname#style = "" cursor: text; display: block; fondos: #fffff; padding-left: 8; "" onClick = "" window.event.cancelbubble = true; ""> |#data#|
Divsets (2) = "<tr> <td> <div id = sect#sectname#style =" "Fondo:#7EA5d7; color: LightSteelBlue; Padding-Left: 4; Padding-Right: 4; Bottom de almo style = "" Display: None; Background: LightSteelBlue; Padding-Left: 8 ""> |#Data#|
dbg_show_default = "0,0,0,0,0,0,0,0,0,0,0,0,0,0"
Final
Propiedad pública Let habilitado (bnewValue) '' '[bool] establece "habilitado" en verdadero o falso