X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FManual%2FTutorial%2FDebugging.pod;h=adc4d62e2e95cf724944019527691ae82782f202;hb=c19d127ebfc41407188cbb614c47635b312aad7e;hp=d65f842cbe00998d466eb16d3f4713d07084511b;hpb=2b7a5d369bb888c61b484c79cdf785d0209bfbef;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Manual/Tutorial/Debugging.pod b/lib/Catalyst/Manual/Tutorial/Debugging.pod index d65f842..adc4d62 100644 --- a/lib/Catalyst/Manual/Tutorial/Debugging.pod +++ b/lib/Catalyst/Manual/Tutorial/Debugging.pod @@ -2,8 +2,6 @@ Catalyst::Manual::Tutorial::Debugging - Catalyst Tutorial - Part 6: Debugging - - =head1 OVERVIEW This is B for the Catalyst tutorial. @@ -46,18 +44,18 @@ L =item 9 -L +L =back - =head1 DESCRIPTION This part of the tutorial takes a brief look at the primary options available for troubleshooting Catalyst applications. -Note that when it comes to debugging and troubleshooting, there are two camps: +Note that when it comes to debugging and troubleshooting, there are two +camps: =over 4 @@ -73,31 +71,29 @@ Fans of interactive debuggers. Catalyst is able to easily accommodate both styles of debugging. - - =head1 LOG STATEMENTS Folks in the former group can use Catalyst's C<$c-Elog> facility. -For example, if you add the following code to a controller action -method: +(See L for more detail.) For example, if you add the +following code to a controller action method: - $c->log->debug("This is a test log message"); + $c->log->info("Starting the foreach loop here"); + + $c->log->debug("Value of $id is: ".$id); Then the Catalyst development server will display your message along -with the other debug output. To accomplish the same thing in a TTSite +with the other debug output. To accomplish the same thing in a TTSite view use: [% Catalyst.log.debug("This is a test log message") %] -You can also use L in both Catalyst code -(C<$c-Elog-Edumper($myvar)>) and TT templates (C<[% -Dumper.dump(book) %]> as discussed in earlier parts of the tutorial. - - +You can also use L in both Catalyst code (Clog-Edebug("$var is: ".Dumper($var));)>) and +TT templates (C<[% Dumper.dump(book) %]>. =head1 RUNNING CATALYST UNDER THE PERL DEBUGGER -Members of the interactive debuggers fan club will also be at home with +Members of the interactive-debugger fan club will also be at home with Catalyst applications. One approach to this style of Perl debugging is to embed breakpoints in your code. For example, open C in your editor and add the @@ -233,15 +229,14 @@ For more information on using the Perl debugger, please see C and C. You can also type C or C at the debugger prompt to view the built-in help screens. - - =head1 AUTHOR Kennedy Clark, C Please report any errors, issues or suggestions to the author. -Copyright 2006, Kennedy Clark, under Creative Commons License (L). +Copyright 2006, Kennedy Clark, under Creative Commons License +(L). Version: .94