Examples:

$aryReturn=$this->MyFunctionReturnsAnArray();
$value="Whatever";

print t3lib_div::print_arry($aryReturn); // messy,basic and might just stick
the output anywhere on screen
print "<br>Value is ".$value;

$content='<h1>This is what comes out from the extension</h1>
<div class="debug">You want the
array?'.t3lib_div::print_arry($aryReturn).'<br>Another
value:'.$value.'</div>
'; // a bit more controlled, adds debug values onto its own layer

// last thing in the main function
                return $this->pi_wrapInBaseClass($content);

} // end of main


and in your css you have defined something like (I always attach a
stylesheet to my extensions, but you could define the style in the page
output itself):

.debug {
        position:absolute; 
        left:131px; 
        top:40px; 
        width:298px; 
        height:62px; 
        z-index:1
}

Does this very basic set of examples help?

Fr. S

Fr. Simon Rundell SCP
Parish of S. Thomas the Apostle, Elson
The Vicarage, 21 Elson Road,
Gosport, Hants, PO12 4BL
email: [EMAIL PROTECTED] 
award winning web: www.saintthomaselson.org.uk 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of dave typo
Sent: 22 May 2007 16:18
To: TYPO3 English
Subject: Re: [TYPO3] debugging php of an extension

could you give me some example code? I'm not sure I quite understand

thanks,

-dave

On 5/22/07, Fr. Simon Rundell SCP <[EMAIL PROTECTED]> wrote:
> I use lots of temporary print $value entries which I can comment out, 
> make frequent use of t3lib_div::print_array($array) function, or if 
> you are adding to the $content string for output through the API, I 
> often create in CSS a layer for debugging to which I can output key 
> values. <div class="debug">Value:'.$value.'</div>
>
> > > > Zend Studio Professional Edition. $299.
>
> Fr. Simon's Unprofessional Edition £0
>
>
> Fr. Simon Rundell SCP
> Parish of S. Thomas the Apostle, Elson The Vicarage, 21 Elson Road, 
> Gosport, Hants, PO12 4BL
> email: [EMAIL PROTECTED]
> award winning web: www.saintthomaselson.org.uk
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of dave 
> typo
> Sent: 22 May 2007 14:47
> To: TYPO3 English
> Subject: Re: [TYPO3] debugging php of an extension
>
> how is that extension different from simply using the debug() code in 
> a php file?
>
> On 5/22/07, Bernd Wilke <[EMAIL PROTECTED]> wrote:
> > "dave typo" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 
> >
news:[EMAIL PROTECTED]
> > > free solution?
> >
> > http://typo3.org/extensions/repository/view/cc_debug/1.0.0/
> >
> > ;-)
> >
> > Bernd
> >
> > > On 5/22/07, Dmitry Dulepov <[EMAIL PROTECTED]> wrote:
> > > > dave typo wrote:
> > > > > hey whats the best way to debug an extension in typo3? what is 
> > > > > a good debugger or a debugging method for typo3?
> > > >
> > > > Zend Studio Professional Edition. $299.
> > > >
> >
> > --
> > www.bernd-wilke.net
> >
> > _______________________________________________
> > TYPO3-english mailing list
> > [email protected]
> > http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
> >
> _______________________________________________
> TYPO3-english mailing list
> [email protected]
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>
> _______________________________________________
> TYPO3-english mailing list
> [email protected]
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>
_______________________________________________
TYPO3-english mailing list
[email protected]
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english

_______________________________________________
TYPO3-english mailing list
[email protected]
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english

Reply via email to