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   3249 Views

Avatar
BigChris

27 February 2010 at 2:07am (Last edited: 27 February 2010 2:18am), Community Member, 63 Posts

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

27 February 2010 at 10:03am Community Member, 528 Posts

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

2 March 2010 at 5:01am Community Member, 63 Posts

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

2 March 2010 at 1:37pm Community Member, 41 Posts

try

var_dump($foo);

Debug::show($foo);

Debug::dump($foo);

hope that's what you after.

Avatar
Mo

3 March 2010 at 5:49am Community Member, 509 Posts

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

Mo