If my page gives me errors. can I use Trace to display the value of certain variable in explorer.

How do we use trace to display the variable. Should I place my Trace instruction before or after the lign that generates the error.

I am not sure about the usage of Trace and if it fits this scenario.

Thanks.