[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LSMB through the perl debugger.





Chris Travers wrote:
There are a few options for debugging the software, and some of them
require more knowledge of the code than others.

The first option  (requiring less knowledge) is to use the following
information to pull state info in the CGI app:
1)  print STDERR
2)  $form->debug
3) $form->error

The second option is to actually create a script that can run in a
debugger.  This requires more knowledge of the inputs than you might
otherwise want to start with and it requires creating a wrapper script
to simulate the CGI input.  You could probably (in 1.2) do this by
passing the arg string to the script.

For example:
perl -d ct.pl "type=customer&action=add"

If you are using Firefox and have the webdeveloper plugin, you can
convert POST to GET methods and take the arg strings this way.
This last bit sounds very useful.
I use that toolbar quite a lot.
I just used POST to GET today to debug if an anti-spambot method I just came up with was working.
Is there anything else I need to turn on or add to use this?
I noticed that Log.pm prints to STDERR.
Does this module work, could I redirect this output to a file I could tail?

--
A human being should be able to change a diaper, plan an invasion,
butcher a hog, conn a ship, design a building, write a sonnet, balance
accounts, build a wall, set a bone, comfort the dying, take orders,
give orders, cooperate, act alone, solve equations, analyze a new
problem, pitch manure, program a computer, cook a tasty meal, fight
efficiently, die gallantly. Specialization is for insects.
  -- Robert Heinlein