UPD: See the latest version somewhere below in the thread.
Debugging, to a great extent, is like a detective story.
And in both cases one needs more evidences to catch a a bad egg
This small utility makes some things more evident (actually, some functions are the same as in the Inspector tool) and helped me a lot with finding memory leakages and optimizing scenes.
(If your app runs in real time for several hours even 1 texture/minute leak may result to crashes).
FInally I adopted it to PG. There are a lot of possibilities how to develop it further, including some logging capabilities and visual data presentation.
Here is the simplest version - https://playground.babylonjs.com/#938RNX#8
It is possible to use in almost any Playground example, just copy and paste the relevant part!
Here are some examples how to use it to debug with examples from Documentation:
(screenshots are made on old laptop)
If you zoom out, there will be almost the same parameters
Even if meshes are not visible, they still continue to render.
To correct this me may just set camera.maxZ = 50 - https://playground.babylonjs.com/#KA93U#672
and get much better parameters when meshes are invisible.
Another example - explosion particle system at https://playground.babylonjs.com/#X37LS1#86
While it is extremely funny to press Space to make explosions, one may notice that the number of meshes is increasing with every explosion.
Seems that the problem is that there are conditions when emitter is created but not disposed later.