Page 1 of 1
Bug in proudction I can't reproduce in the studio
Posted: 25 May 2020, 06:16
by adela82
I have a bug in my game that happens once in a blue moon, so I can't reproduce it in development. But it's happening in production as the game is being played much. My question is if there is a way to access to self::trace and self::dump of production in order to find the *@#$ bug!
I'm turning crazy!
Re: Bug in proudction I can't reproduce in the studio
Posted: 25 May 2020, 08:32
by tchobello
perhaps a console.log ?
Re: Bug in proudction I can't reproduce in the studio
Posted: 25 May 2020, 08:57
by ShaPhi7
If it's in .js you can add a line saying "debugger;" into your code. Press F12 whilst in Chrome (or otherwise open up your browsers development console) before you run your code. The code should hit a breakpoint on the "debugger;" line and the console will automatically take you to that line and allow you to debug through it.
Obviously remember to remove the debugger; once you're done to avoid the game freezing there in future!
Re: Bug in proudction I can't reproduce in the studio
Posted: 25 May 2020, 10:51
by RicardoRix
Do you have a bug report and a table id number?
There potentially is a way to load this game into your studio game. You have to do it fairly quickly after the game has finished though (maybe 24 hrs?). There are some instructions in the wiki.
The debugger; option doesn't sound like a good idea in production, you may well be introducing inadvertent games freezes into your game as well. And if you can add the debugger statement together with an if statement then you're already most of the way there to know what's happening anyway.
Re: Bug in proudction I can't reproduce in the studio
Posted: 31 May 2020, 17:42
by Een
RicardoRix wrote: ↑25 May 2020, 10:51
Do you have a bug report and a table id number?
There potentially is a way to load this game into your studio game. You have to do it fairly quickly after the game has finished though (maybe 24 hrs?). There are some instructions in the wiki.
Fyi, this studio function was broken. I has now been repaired and should work again with the procedure detailed in the wiki "practical debugging" section.