Be a Supporter!

Browse Sections


Newgrounds Wiki: About Debug Mode

The API features several debug settings that allow you to test how your game would operate in different situations:
  • Release mode (no debugging)
  • Logged-in and playing on Newgrounds
  • Logged-out of Newgrounds, or playing on a different site
  • Playing on a blocked site
  • Playing an old version
By default, the API is set to Logged-in debug mode. This means that your game will act is if it were being played by a Newgrounds user, even though you are testing locally.

Changing the debug mode

If you are using Flash, the debug mode is set inside the API Connector.

If you are using ActionScript, the debug mode can be set using API.debugMode:
import com.newgrounds.API;
API.debugMode = API.RELEASE_MODE;  // turn off debugging
Debug mode will automatically switch off if the game is being played on the web. However, it is good practice to turn off debug mode before you release your game to the public. This way the API will function properly if someone downloads your SWF to play locally on their computer.