Dump_var output?

Game development with Board Game Arena Studio
Post Reply
User avatar
spamymaps
Posts: 10
Joined: 10 April 2014, 01:27

Dump_var output?

Post by spamymaps »

I'm trying to learn how to debug some of the php stuff and I was inserting some dump_var statements in the reversi example to print out some data that is returned for the database, but I can't seem to figure out where it gets printed to. Any help available for this?
User avatar
docthib
Posts: 73
Joined: 10 August 2015, 14:05

Re: Dump_var output?

Post by docthib »

You mean var_dump() ?

If the app does not crash before it should appear like a temporary notification and in game log (right)
User avatar
spamymaps
Posts: 10
Joined: 10 April 2014, 01:27

Re: Dump_var output?

Post by spamymaps »

Yes, var_dump(). The app is not crashing as it finishes drawing everything to where I am in the code, just wanted to get some more insight on what is getting returned. Just can't figure out where it's going to.
User avatar
DrKarotte
Posts: 279
Joined: 22 September 2015, 23:42

Re: Dump_var output?

Post by DrKarotte »

I think it appears in the BGA log file (must be opened with the link next to "Go to database"), well hidden there (perhaps you add some unique string which you can search?).
User avatar
Victoria_La
Posts: 665
Joined: 28 December 2015, 20:55

Re: Dump_var output?

Post by Victoria_La »

var_dump(), echo, print will appear on the game screen, i.e. it would be instead of html which usually make browser less than happy,
if you use $this->dump('varname', $variable)
It will be in the game logs, the long version of them (the link that DrKarotte mentioned).
If you php method throws an exception however it won't be there because database transaction is rolled back.

http://en.doc.boardgamearena.com/Practical_debugging
Post Reply

Return to “Developers”