Page 1 of 1

Dump_var output?

Posted: 08 June 2017, 14:23
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?

Re: Dump_var output?

Posted: 08 June 2017, 16:24
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)

Re: Dump_var output?

Posted: 08 June 2017, 17:23
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.

Re: Dump_var output?

Posted: 08 June 2017, 18:45
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?).

Re: Dump_var output?

Posted: 11 June 2017, 03:05
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