Re: Printing out or displaying for debugging [message #179864 is a reply to message #179846] |
Thu, 13 December 2012 13:29 |
C
Messages: 24 Registered: January 2012
Karma:
|
Junior Member |
|
|
On Tuesday, December 11, 2012 9:04:28 PM UTC+2, Robert Heller wrote:
> At Tue, 11 Dec 2012 07:59:47 -0800 (PST) C <wrong(dot)address(dot)1(at)gmail(dot)com> wrote: > > What is a good way to see the values of a few variables for debugging? > I cannot debug locally. I have to put the code on the server in the > normal Internet site (which does not receive a lot of human visitors), > so it would not hurt to display the values of some variables for a few > minutes while I am debugging. echo '<!-- var1 = '.$var1.' -->'; This creates an HTML comment. Nothing is actually displayed in your (or anyone else's) browser. BUT if you <right click>=>Show Page Source, you can see the HTML code, including the HTML comments. > -- Robert Heller -- 978-544-6933 / heller(at)deepsoft(dot)com Deepwoods Software -- http://www.deepsoft.com/ () ascii ribbon campaign -- against html e-mail /\ www.asciiribbon.org -- against proprietary attachments
I think this was the best way. I did this and found the error with little effort. Thanks very much.
|
|
|