Widget to Display Javascript Errors, On Load and / or Ongoing?

I am converting my Bokeh 2.0 to 2.0.2. I had lots of uses of simply setting a CustomJS callback on a widget. Apparently the current standard is js_on_change(property_name, callback) and simple or complicated forms of js_on_event ~ js_on_event-name.

One of the things that tripped me up is not remembering the correct property to set for a control js_on_change or js_on_click. If I set js_on_change for ‘value’, and a control does not have that property, then my html is generated but the display is completely blank. There are no error messages in Python to help debug the problem.

If Javascript generates, or can log, error messages / stack traces, would it be possible to have a Bokeh widget to throw into your project during development that would capture and display those with a configurable buffer size? Even if technical issues make live reporting on standalone html not feasible, just capturing the OnLoad errors that caused my issue would be very useful.

When I mess up the allowed property names for a widget in python, I get an error message giving me the legal list. The same in Javascript in these kinds of situations would be nice.

Likewise, if there are other tools that would help me capture and display JavaScript errors please let me know. I develop for the Chrome browser.

I think @mateusz was interested in a “debug console” widget or tool I think. I can’t find any existing issue (I thought there was one but can’t see any) so I would say it’d be good to open a GH issue about this so for sure.

Have you checked the JavaScript console in DevTools? If you see just a blank page, usually there’s some error in the JS console.