Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Debug SilverStripe Variables


Reply


5 Posts   3392 Views

Avatar
BigChris

Community Member, 63 Posts

27 February 2010 at 2:07am

Edited: 27/02/2010 2:18am

Hello,

How do you output a list of available SilverStripe variables?

In php if stuck I would use phpinfo(); to list all variables on a page and if they populated.

Can something similar be done with SilverStripe?

Not sure if this is an URL Variable Tools, if so what would I use?

Regards
Chris

Avatar
zenmonkey

Community Member, 532 Posts

27 February 2010 at 10:03am

I take it you're looking for all the functions available on a certain controller

Adding ? debugmethods=1 to the end of your URL may give you some of the Information you're looking for.

Avatar
BigChris

Community Member, 63 Posts

2 March 2010 at 5:01am

Hi Zenmonkey,

Thanks for the tip. Its a good help, but I think its the passed in SilverStripe parameters and if they are populated which is what I am after.

Cheers
Chris

Avatar
carlos

Community Member, 41 Posts

2 March 2010 at 1:37pm

try

var_dump($foo);

Debug::show($foo);

Debug::dump($foo);

hope that's what you after.

Avatar
Mo

Community Member, 510 Posts

3 March 2010 at 5:49am

Also, have you looked here? http://doc.silverstripe.org/doku.php?id=urlvariabletools

Mo