Skip to content

Output missing from console (Maximum call stack size exceeded) #3467

Closed
@gohai

Description

@gohai

p5.js version

1.11.5

What is your operating system?

Mac OS

Web browser and version

Chrome 135.0.7049.96

Actual Behavior

Calling print() or console.log() on a range of objects is silently failing, in that they aren't printed onto the p5 web editor's console, but still show up in the browser's native console (together with the "Maximum call stack size exceeded" message).

This is my number #1 issue in using the web editor in an educational setting presently. I am not sure if my reproducer sketch below has a circular data structure or not, which is why I am opening this separate issue.

Expected Behavior

print() or console.log() should always output to the console, so that the program flow can be observed using it.

Steps to reproduce

Steps:

  1. Run the below snippet in the p5.js web editor.

Snippet:

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

function draw() {
  background(220);
}

function mousePressed() {
  console.log(select("canvas"));
}

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