My setup is like yours. Here's what I do. I keep a web browser, a telnet client, and my editor (CodeWright with integrated ftp client) open on my Windoze box.

I code a while. Then hit upload to fire off my work to the server. Then I request the appropriate page in my browser.

If there are any problems, I run this shell script (as root -- so it can write to the error log) on the server using the telnet client:

if [ "$#" -eq 1 ]; then lines=$1 else lines=50 fi echo echo echo "----------printing $lines lines----------" log_file="/usr/local/apache/logs/www.myserver.com-error_log" tail -n$lines $log_file echo "#####################################">>$log_file date >> $log_file echo "#####################################">>$log_file
And then back to my editor to fix or build some more.

The lines in the shell script that append to the log_file mark it and time/date stamp it each time I dump the tail. This way, I can easily see which error entries are new with the most recent page load attempt. Very handy.

The rhythm of this entire cycle has become second nature to me. There is a 2-5 second delay with each save. But I don't even notice that any more. And the differences in the environment between the server and my box are enough that there would be sure to be surprises if I tested first on my local machine. It's just not worth it.

Everybody's different but this works for me. HTH


In reply to Re: Writing/Debugging locally and then uploading by dvergin
in thread Writing/Debugging locally and then uploading by coolmichael

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.