The debug mode is really HARD to use

Sometimes, starting debug mode directly causes the Defold editor to crash. Most of the time, running games in debug mode results in a very low frame rate, possibly only around 1–2 FPS, which makes it nearly impossible for me to use debug mode to troubleshoot the game. Most of the time, I have to rely on print function to slowly test the issues that I have encountered. I wonder if anyone else has experienced this problem or if I have some settings configured incorrectly?

You mean when you run using Debug->Start/Attach?

Does this happen in all projects or just one?

Running with the debugger enabled will be slower since there is a debug hook set in the code which will trigger on every line of Lua code. It is in my experience not slowing down the game unless you are running through many many many lines of code each update. Are you running a lot of code each frame (by a lot I mean perhaps in the order of thousand lines of code)?

Thank you very much for your suggestion. After some testing, it indeed seems related to the update function. in my game All UI elements are created with Druid, and I called druid:update function in all gui_scripts. Since my game has a large number of UI elements, this may have caused some negative impact. I removed most of the druid:update calls, and it currently seems to be working fine in debugger mode. Thank you very much!

1 Like