Skip to content

p5.js Web Editor does not work with chrome dev tools. #1853

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sflanker opened this issue May 6, 2021 · 3 comments · Fixed by #1894
Closed

p5.js Web Editor does not work with chrome dev tools. #1853

sflanker opened this issue May 6, 2021 · 3 comments · Fixed by #1894

Comments

@sflanker
Copy link

sflanker commented May 6, 2021

Nature of issue?

I believe this is a bug, possibly a regression in recent browser versions? But perhaps it has never worked and this is a feature request?

Details about the bug:

There are a number of issues with the the way the p5.js Web Editor loads the sketch javascript that makes it not work well with Chrome/Chromium developer tools:

  • It is difficult if not impossible to find the running sketch javascript via the Sources tab of the dev tools.
  • The source opened when a debugger; statement is executed doesn't show the execution pointer on the correct line.
  • Stack traces and the call stack in the debugger show incorrect line numbers.

Here's what the broken dev tools look like using the p5.js editor:

And here's what they should look like (using the OpenProcessing.org editor for comparison):

  • Web browser and version: Google Chrome 90.0.4430.93 (also reproducible on other Chromium based browsers such as Brave)
  • Operating System: MacOS
  • Steps to reproduce this bug:
@welcome
Copy link

welcome bot commented May 6, 2021

Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.

@catarak
Copy link
Member

catarak commented May 7, 2021

Thanks for reporting! This is due to a difference in how the p5.js Editor and OpenProcessing handle rendering sketches. I've been working on rewrite of how the p5.js Editor renders, and this issue has given me a lot to think about...

@catarak
Copy link
Member

catarak commented May 12, 2021

I was actually able to figure out a fix for this! It will take a minute to get tested and merged in and deployed, as it's dependent on some rendering changes I'm making as part of #166.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants