From: Paul G. <pa...@ge...> - 2007-07-31 21:13:30
Attachments:
signature.asc
|
Hi folks, I've made a few useful (i think) changes to the Shorewall module, and i plan to make a few more before i send in the patches. However, i would like to do some more testing & debugging, and i'd like to know what sort of debugging tools are at my disposal. =46rom what i can tell, the Perl errors from my module actually go nowher= e at all. Is this correct/intended? What is the preferred mechanism to capture Perl errors and produce debug output? I've experimented with saving temporary files using a technique i borrowed from another module, and that seems to work sometimes, but not always (and possibly is dependent upon the actual path used). I'm confused! :-( Thanks in advance, Paul <http://paulgear.webhop.net> -- Did you know? It is illegal to use your copy of Microsoft Office on multiple computers without multiple licenses. Why not try the free alternative OpenOffice.org? <http://www.openoffice.org> |
From: Jamie C. <jca...@we...> - 2007-07-31 23:28:54
|
On 31/Jul/2007 14:12 Paul Gear wrote .. > Hi folks, > > I've made a few useful (i think) changes to the Shorewall module, and i > plan to make a few more before i send in the patches. However, i would > like to do some more testing & debugging, and i'd like to know what sort > of debugging tools are at my disposal. > > From what i can tell, the Perl errors from my module actually go nowhere > at all. Is this correct/intended? What is the preferred mechanism to > capture Perl errors and produce debug output? I've experimented with > saving temporary files using a technique i borrowed from another module, > and that seems to work sometimes, but not always (and possibly is > dependent upon the actual path used). I'm confused! :-( Hi Paul, The debugging technique I usually use is to print to STDERR, which is then logged to /var/webmin/miniserv.error . Not exactly the most modern technique in this age of source-level debuggers, breakpoints and variable watching, but it works for me :-) - Jamie |
From: Paul G. <pa...@ge...> - 2007-08-01 07:36:09
Attachments:
signature.asc
webmin-shorewall.patch.bz2
|
Jamie Cameron wrote: > On 31/Jul/2007 14:12 Paul Gear wrote .. >> Hi folks, >> >> I've made a few useful (i think) changes to the Shorewall module, and i >> plan to make a few more before i send in the patches. However, i would >> like to do some more testing & debugging, and i'd like to know what sort >> of debugging tools are at my disposal. >> >> From what i can tell, the Perl errors from my module actually go nowhere >> at all. Is this correct/intended? What is the preferred mechanism to >> capture Perl errors and produce debug output? I've experimented with >> saving temporary files using a technique i borrowed from another module, >> and that seems to work sometimes, but not always (and possibly is >> dependent upon the actual path used). I'm confused! :-( > > Hi Paul, > The debugging technique I usually use is to print to STDERR, which is > then logged to /var/webmin/miniserv.error . Not exactly the most modern > technique in this age of source-level debuggers, breakpoints and variable > watching, but it works for me :-) Works for me - but i'm a bit old-school, too. ;-) Here's a first cut patch at what i've done with Shorewall. (Important points are in the changelog.) I've done some basic testing of the changes, but i'm sure it could use more. I wasn't sure about a lot of the webmin idioms for things, so i tried to preserve the coding style (except for the zero-indent technique!) as much as i could. Hope it works for everyone. I'd appreciate any feedback. -- Paul <http://paulgear.webhop.net> -- Be nice to apostrophes! http://www.apostrophe.fsnet.co.uk/ |
From: Jamie C. <jca...@we...> - 2007-08-02 08:12:27
|
On 1/Aug/2007 00:35 Paul Gear wrote .. > Jamie Cameron wrote: > > On 31/Jul/2007 14:12 Paul Gear wrote .. > >> Hi folks, > >> > >> I've made a few useful (i think) changes to the Shorewall module, and > i > >> plan to make a few more before i send in the patches. However, i would > >> like to do some more testing & debugging, and i'd like to know what > sort > >> of debugging tools are at my disposal. > >> > >> From what i can tell, the Perl errors from my module actually go nowhere > >> at all. Is this correct/intended? What is the preferred mechanism > to > >> capture Perl errors and produce debug output? I've experimented with > >> saving temporary files using a technique i borrowed from another module, > >> and that seems to work sometimes, but not always (and possibly is > >> dependent upon the actual path used). I'm confused! :-( > > > > Hi Paul, > > The debugging technique I usually use is to print to STDERR, which is > > then logged to /var/webmin/miniserv.error . Not exactly the most modern > > technique in this age of source-level debuggers, breakpoints and variable > > watching, but it works for me :-) > > Works for me - but i'm a bit old-school, too. ;-) Here's a first cut > patch at what i've done with Shorewall. (Important points are in the > changelog.) I've done some basic testing of the changes, but i'm sure > it could use more. > > I wasn't sure about a lot of the webmin idioms for things, so i tried to > preserve the coding style (except for the zero-indent technique!) as > much as i could. Hope it works for everyone. I'd appreciate any feedback. Thanks for the patch! I'll take a closer look at it tomorrow .. - Jamie |
From: Jamie C. <jca...@we...> - 2007-08-02 20:15:40
|
On 1/Aug/2007 00:35 Paul Gear wrote .. > Jamie Cameron wrote: > > On 31/Jul/2007 14:12 Paul Gear wrote .. > >> Hi folks, > >> > >> I've made a few useful (i think) changes to the Shorewall module, and > i > >> plan to make a few more before i send in the patches. However, i would > >> like to do some more testing & debugging, and i'd like to know what > sort > >> of debugging tools are at my disposal. > >> > >> From what i can tell, the Perl errors from my module actually go nowhere > >> at all. Is this correct/intended? What is the preferred mechanism > to > >> capture Perl errors and produce debug output? I've experimented with > >> saving temporary files using a technique i borrowed from another module, > >> and that seems to work sometimes, but not always (and possibly is > >> dependent upon the actual path used). I'm confused! :-( > > > > Hi Paul, > > The debugging technique I usually use is to print to STDERR, which is > > then logged to /var/webmin/miniserv.error . Not exactly the most modern > > technique in this age of source-level debuggers, breakpoints and variable > > watching, but it works for me :-) > > Works for me - but i'm a bit old-school, too. ;-) Here's a first cut > patch at what i've done with Shorewall. (Important points are in the > changelog.) I've done some basic testing of the changes, but i'm sure > it could use more. > > I wasn't sure about a lot of the webmin idioms for things, so i tried to > preserve the coding style (except for the zero-indent technique!) as > much as i could. Hope it works for everyone. I'd appreciate any feedback. Ok, the patch looks good. I have applied it to my source tree, and will include it in the Webmin 1.350 release, which I plan to build today. Thanks again! - Jamie |
From: Paul G. <pa...@ge...> - 2007-08-03 23:26:48
Attachments:
signature.asc
|
Jamie Cameron wrote: > On 1/Aug/2007 00:35 Paul Gear wrote .. >> Jamie Cameron wrote: >> ... >> I wasn't sure about a lot of the webmin idioms for things, so i tried = to >> preserve the coding style (except for the zero-indent technique!) as >> much as i could. Hope it works for everyone. I'd appreciate any feed= back. >=20 > Ok, the patch looks good. I have applied it to my source tree, and will= > include it in the Webmin 1.350 release, which I plan to build today.=20 There is at least one user-visible problem in what i've done, which is no icons for the params & shorewall.conf configs. I'm not much at art... ;-) --=20 Paul <http://paulgear.webhop.net> -- Tired of paying for Microsoft Office? Running an illegal copy and want to make it legal? Try OpenOffice.org! It's free and does most of the things Microsoft Office does. <http://www.openoffice.org> |
From: Jamie C. <jca...@we...> - 2007-08-03 23:30:43
|
On 3/Aug/2007 16:26 Paul Gear wrote .. > Jamie Cameron wrote: > > On 1/Aug/2007 00:35 Paul Gear wrote .. > >> Jamie Cameron wrote: > >> ... > >> I wasn't sure about a lot of the webmin idioms for things, so i tried > to > >> preserve the coding style (except for the zero-indent technique!) as > >> much as i could. Hope it works for everyone. I'd appreciate any feedback. > > > > Ok, the patch looks good. I have applied it to my source tree, and will > > include it in the Webmin 1.350 release, which I plan to build today. > > There is at least one user-visible problem in what i've done, which is > no icons for the params & shorewall.conf configs. I'm not much at > art... ;-) No worries, I'll make some up .. - Jamie |
From: Hugo C. <hug...@ya...> - 2007-08-01 15:08:47
|
I use two independent debugging techniques when developing webmin/apache modules: 1. The first one is a kind of logging, complementary to what webmin already does. Webmin logs to a single file for all requests, I log to a set of rotating files, each file contains a information of the execution of cgi script. The implementation of this can be found in the sesa scripts, a small application framework on top of webmin (available on sourceforge.net/projects/sesa, the specific files that implement the feature are Sems.pm and Persistency.pm). The advantage of these log files is that they don't fill your disk (they are rotating), and give you a good history of what a user has done in the recent past. The disadvantage is obviously performance. 2. From CPAN, there is a module Devel::ptkdb that allows to do source code debugging, also for cgi scripts running on a remote server. To do this, you set the DISPLAY variable to your display (where your browser is runnning), in a very first _BEGIN_ block in your cgi script. Then, second, you use the interpreter sequence '#!/usr/bin/perl -d:ptkdb' to call the debugger. Then, make a request to the server, such that it executes your cgi script. Perhaps small changes are required to the webmin configuration, I am not entirely sure about it (e.g. to fork cgi scripts ?). I have used this technique a lot for debugging complicated cgi scripts. Hugo Paul Gear <pa...@ge...> wrote: Hi folks, I've made a few useful (i think) changes to the Shorewall module, and i plan to make a few more before i send in the patches. However, i would like to do some more testing & debugging, and i'd like to know what sort of debugging tools are at my disposal. >From what i can tell, the Perl errors from my module actually go nowhere at all. Is this correct/intended? What is the preferred mechanism to capture Perl errors and produce debug output? I've experimented with saving temporary files using a technique i borrowed from another module, and that seems to work sometimes, but not always (and possibly is dependent upon the actual path used). I'm confused! :-( Thanks in advance, Paul -- Did you know? It is illegal to use your copy of Microsoft Office on multiple computers without multiple licenses. Why not try the free alternative OpenOffice.org? ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/- Forwarded by the Webmin development list at web...@we... To remove yourself from this list, go to http://lists.sourceforge.net/lists/listinfo/webadmin-devel --------------------------------- Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more. |