Debugger

Debugger (also known as "Debugger box") is a special toolbox in both SMBX and PGE, which allows you to see general information about current level (and world map in PGE).

To access Debugger in SMBX Level Editor, look at the top, press "View" and press "Debugger". Same goes to PGE Editor.

SMBX


Debugger in SMBX 1.3/1.3.0.1. allows you to:


 * See how many Blocks, NPCs, BGOs and Warps are placed in a level
 * See their limits (some of them aren't correct, though)
 * See your current mouse position/coordinates on the level map
 * Swap blocks by typing their IDs
 * See Framerate speed
 * See how many elements are placed in the level, like power-ups, items, etc.

"Blocks Sorted" button in the Debugger box of SMBX can be used if you want to make messed up NPC collisions, so they will fall through blocks. Button will be activated when you will place some blocks in the level.

"Block sorting" means the internal sorting of list which has all placed blocks in the current level. All blocks should be sorted with X and Y coordinates. SMBX is using this internal collision detection algorithm with NPCs, which are trying to find a nearest block to check collisions with it. If the block array won't be sorted, NPCs will fall down or walk through some blocks. But the player will collide with those blocks, so he won't fall through them.

If you want to make this effect in your level, follow these steps:

1) Make a level, place blocks in the level, place some other blocks far away from the blocks you already placed (for example in Section 2) in the level, save and play-test the level.

2) After play-testing, open the level file in Notepad, and cut blocks from top of list (after player spawn points definition and before blocks which located in another section) and paste them into bottom of list (before first "next" label).

3) When you're done, open the level again and test the level. SMBX will ask you if you want to save the level, when it will do that, always press No or else your notepad changes will be lost.

''Note: If you will place some block in the level while play-testing the level, you will be able to press that "Blocks Sorted" button in the Debugger box, which will return things back to normal if pressed.

There is no Debugger box for World Map mode, maybe it was planned to appear in future updates of SMBX. However, in World Map mode you can see your current mouse position below, which is useful to make World Map warps or warps between level and world map.

PGE Editor


Debugger in the current stable version of PGE Editor allows you to:


 * See your current mouse position/coordinates on the level map and world map
 * Going to the position by typing its X and Y coordinates in a level and world map
 * See how many Player Start Points, Blocks, BGOs, NPCs, Warps and Physical Environment Zones (Water & Quicksand) are placed in the level; see how many Tiles, Sceneries, Paths, Level Points and Music Boxes are placed in the world map
 * You can't see their limits, however, PGE will warn you when you will hit the limit of something. PGE Standard doesn't have any limits, unlike SMBX64 Standard.
 * See how many items/elements are placed in the level or in the world map (only version 0.2.1.8-dev and newer). Unlike SMBX's debugger, counters are fully customizable!

Trivia
Since some limits in the Debugger box of SMBX are not correct, read about the real limits of SMBX64 Standard here: http://wohlsoft.ru/pgewiki/SMBX64#Limits