I am looking at an a webpage written in classic ASP and I am in the middle of a 'while' statement. I want to use the Chrome Developer tools to debug the values on my page. I tried inserting
console.log(value);
which works with C# applications, but it threw a Expected end of statement
at the console.log
line I inserted.
I am just looking for a quick tip on how use the debugger with classic asp?
I make it by a function that returns a javascript console.log() and it works fine for me in the most used browsers (IE 10, Chrome, FireFox).
function aspLog(value)
response.Write("<script language=javascript>console.log(`'" & value & "'`); </script>")
end function
Then, just call it in the asp page (or functions.asp file):
aspLog("Test text")
aspLog(100.0)
Unfortunately, this makes the html generated is full of javascript tags. So do not forget to comment or remove theses calls to the function aspLog() when the code is ready . If you use backticks `` you can handle inputs with both single and double quotes. Like sql queries etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With