voila-embed icon indicating copy to clipboard operation
voila-embed copied to clipboard

debugging callback widget events

Open havok2063 opened this issue 5 years ago • 3 comments

What's the best way to debug callback widget events in Voila? I put a bunch of print statements inside my callback, and started Voila in debug mode, but that info didn't seem to print to stdout. I get everything else. This link seems to only refer to debugging within the notebook. Running through Voila, I can't access the debug_viewer.

havok2063 avatar Feb 10 '20 21:02 havok2063

The output widget can be made available to Voila by adding a mount-id:

import ipywidgets as widgets
import traitlets

out = widgets.Output()
out.add_traits(_metadata=traitlets.Dict(default_value={'mount_id': 'out'}).tag(sync=True))
out

mariobuikhuizen avatar Feb 11 '20 12:02 mariobuikhuizen

Added an example in d4cde49

mariobuikhuizen avatar Feb 11 '20 12:02 mariobuikhuizen

Awesome, thanks! This is helpful.

havok2063 avatar Feb 11 '20 21:02 havok2063