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

Easier debugging when a component fails to render #210

Open
itsderek23 opened this issue Oct 26, 2020 · 0 comments
Open

Easier debugging when a component fails to render #210

itsderek23 opened this issue Oct 26, 2020 · 0 comments

Comments

@itsderek23
Copy link
Contributor

When a component fails to render in experiment mode, it looks like this on the canvas:

image

(A red-shaded rectangle with an X). No error information is displayed alongside the broken component.

Enabling the JS console

The best way I've found to debug is to enable the web console and watch for JS errors. They do appear here. For example, see this log output when loading experiment mode w/a broken component. The critical portion:

Uncaught ReferenceError: blah is not defined
    Button Button.js:7

There is also this message, which is helpful:

The above error occurred in the <Button> component:
    in Button (created by i)
    in i (created by u)
    in u
    in UXPinWrapper

However, it is a 222-line file w/some duplication of the error message.

Storybook Error Handling

Storybook renders the error right in the UI. However, it is hard to track the error to a component JS as just the bundle is referenced:

image

Proposal

It'd be great if it was possible to display rendering errors for the component somewhere within our UI (versus the error console). For example, the properties panel when clicking on a component.

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

No branches or pull requests

2 participants