Skip to content
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

Console to show error messages #327

Open
nearnshaw opened this issue Dec 2, 2024 · 0 comments · May be fixed by #442
Open

Console to show error messages #327

nearnshaw opened this issue Dec 2, 2024 · 0 comments · May be fixed by #442
Labels
1-high Very important but not critical or game breaking dev exp Improves the developer experience by removing common pain points editor
Milestone

Comments

@nearnshaw
Copy link
Member

nearnshaw commented Dec 2, 2024

We need to show error messages on the Creator Hub when you run a preview

Today we output all errors from the SDK into the command line console, this is super useful for debugging, but when running a scene on the Creator Hub, there is no console.

We should add options next to the Preview button to enable a read-only console to see these errors.

See the designs here:
https://www.figma.com/design/3NfkzCCumOmxjgMGSpSZao/%F0%9F%A7%B0-Creator-Hub-%7C-Debug-Terminal-%7C-Cycle-9%2B?node-id=17433-4431&node-type=section&t=nhvQG98rTlvThhU9-0

The default configuration should be with the console off.
If the console is turned on, the Creator Hub should remember this configuration and implement the new behavior when running preview all projects.

The designs also include a setting for toggling the debug panel, this I assume is a minor task, as we can add or remove a param for that when calling the command to open the explorer

In the future, we might expand this list of options

Some easy errors to reproduce and test:

Non-existing package:

Image

Non-existing function:

Image

Non-existing entity:

Image

Wrong type value:

Image

An interesting observation: In the past (web explorer, pre main.composite), many of these errors could cause the scene to not run at all. In the web explorer, in all the scenarios from the screenshots the scene loads with everything defined on the main.composite, from the visual editor. But the scene is non-interactive, none of the TS code is executed, including smart-item behaviors.

In the new explorer, from the Creator Hub, the scene is a bit more resilient. I see all the static content from main.composite, and smart items are interactive. Any code that is executed before the line with the error also works fine, but anything that loads after the error is not there at all.

On one hand it's great that it's more resilient, but on the other, the errors are more likely to go without detecting, and it'll be much harder to debug when something doesn't behave as expected.
I might assume that the problem is with the one item that is not interactive, when really the problem might be with a completely unrelated line of code that arbitrarily happens to be executed before.

@nearnshaw nearnshaw added this to SDK Dec 2, 2024
@nearnshaw nearnshaw converted this from a draft issue Dec 2, 2024
@nearnshaw nearnshaw added editor dev exp Improves the developer experience by removing common pain points 0-critical Highly important issues that should be prioritised 1-high Very important but not critical or game breaking and removed 0-critical Highly important issues that should be prioritised labels Dec 2, 2024
@nearnshaw nearnshaw changed the title Where to show error messages Console to show error messages Jan 8, 2025
@nearnshaw nearnshaw added this to the Cycle 11 milestone Jan 27, 2025
@nearnshaw nearnshaw moved this from Todo to In Progress in SDK Feb 18, 2025
@nicoecheza nicoecheza linked a pull request Feb 21, 2025 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-high Very important but not critical or game breaking dev exp Improves the developer experience by removing common pain points editor
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

1 participant