Skip to content

In-editor console is out of sync with canvas and browser console #3244

Open
@jesse-harding

Description

@jesse-harding

p5.js version

1.10.0

What is your operating system?

Mac OS

Web browser and version

Chrome v129.0.6668.90

Actual Behavior

The data displayed in the in-editor console are out of sync with the canvas as well as the browser console. It looks like it might be an off-by-one error somewhere or that the in-editor console is updated last and after a delay of some sort, as I first observed it in a sketch where I had assumed I had made an off-by-one indexing error, but then made a barebones sketch to demonstrate the problem. Also, in the attached screenshots, you can see that the two consoles disagree, while the browser console is in-sync with what is being shown in the canvas.
Screenshot 2024-10-07 at 11 11 33 PM 1
Screenshot 2024-10-07 at 11 11 33 PM

Expected Behavior

I expect the console to be updated in synchrony with the browser console and what is being displayed in the canvas

Steps to reproduce

Steps:

  1. run code 2. observe disagreement between consoles and canvas

Snippet:

function setup() {
  createCanvas(400, 400);
  frameRate(2);
}

function draw() {
  if (frameCount % 2 == 0){
    console.log("black");
    background(0);
  }
  else{
    console.log("white");
    background(255);
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugError or unexpected behaviors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions