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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Debug SilverStripe Variables


Go to End


5 Posts   6648 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, 545 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, 42 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, 541 Posts

3 March 2010 at 5:49am