Skip to content
Related Articles
Open in App
Not now

Related Articles

p5.js | noDebugMode() Function

Improve Article
Save Article
  • Difficulty Level : Easy
  • Last Updated : 27 Apr, 2020
Improve Article
Save Article

The noDebugMode() function in p5.js is used to disable the debug mode enabled by debugMode() function in a 3D sketch.



Parameters: This function does not accept any parameters.

Below example illustrates the noDebugMode() function in p5.js:


let newFont;
let debugModeDisabled = false;
function preload() {
  newFont = loadFont('fonts/Montserrat.otf');
function setup() {
  createCanvas(600, 300, WEBGL);
  textFont(newFont, 18);
  // Enable debug mode
  disableDebugButton = createButton("Disable Debug Mode");
  disableDebugButton.position(20, 80);
  disableDebugButton.mouseClicked(() => {
    debugModeDisabled = true;
function draw() {
  text("Click on the button to disable "
        + "the debug mode.", -250, -100);
  // If checkbox is checked
  // Disable debug mode
  if (debugModeDisabled) {


Online editor:

Environment Setup:


My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!