[TYPO3] debugging php of an extension

Fr. Simon Rundell SCP simon at rundell.org.uk
Tue May 22 18:21:17 CEST 2007


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: simon at rundell.org.uk 
award winning web: www.saintthomaselson.org.uk 

-----Original Message-----
From: typo3-english-bounces at lists.netfielders.de
[mailto:typo3-english-bounces at lists.netfielders.de] 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 <simon at rundell.org.uk> 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: simon at rundell.org.uk
> award winning web: www.saintthomaselson.org.uk
>
> -----Original Message-----
> From: typo3-english-bounces at lists.netfielders.de
> [mailto:typo3-english-bounces at lists.netfielders.de] 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 <19m0nyq02 at sneakemail.com> wrote:
> > "dave typo" <typothree at gmail.com> schrieb im Newsbeitrag 
> >
news:mailman.245445.1179828298.21067.typo3-english at lists.netfielders.de...
> > > free solution?
> >
> > http://typo3.org/extensions/repository/view/cc_debug/1.0.0/
> >
> > ;-)
> >
> > Bernd
> >
> > > On 5/22/07, Dmitry Dulepov <9f4eetb02 at sneakemail.com> 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
> > TYPO3-english at lists.netfielders.de
> > http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
> >
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.netfielders.de
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english



More information about the TYPO3-english mailing list