SimonBiggs / scriptedforms

Quickly create live-update GUIs for Python packages using Markdown and simple HTML elements.
Apache License 2.0
508 stars 34 forks source link

See errors in <section-start> #217

Closed olivercrask closed 6 years ago

olivercrask commented 6 years ago

A way to see if there is an error in python code run in the section would be very useful.

SimonBiggs commented 6 years ago

Section start does have its own output area. I imagine any error should display... Does it not?

SimonBiggs commented 6 years ago

Eg does raise Exception('boo') display something?

olivercrask commented 6 years ago

I've noticed that sometimes errors aren't displayed. I will try to find an example, but I've had situations where I have an error but no error message. I then copy the python code from the section-start to another section and then the error info is visible.

SimonBiggs commented 6 years ago

Okay, I need to sort that out. I was thinking of putting an ipython console collapsed and docked to the side of the screen.

It would make debugging much easier... The idea is if ever an error occurs then that console window will pop open.

Do let me know if you can find the cases when that happens. One I know of is errors within conditional components.

On Thu., 5 Apr. 2018, 6:09 pm Oli Crask, notifications@github.com wrote:

I've noticed that sometimes errors aren't displayed. I will try to find an example, but I've had situations where I have an error but no error message. I then copy the python code from the section-start to another section and then the error code is visible.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/SimonBiggs/scriptedforms/issues/217#issuecomment-378854234, or mute the thread https://github.com/notifications/unsubscribe-auth/AGQVe9FurjdBoTUAGayAlmsaAwPba4ztks5tldECgaJpZM4TGmnU .

robmarkcole commented 6 years ago

You could have a ‘dev’ mode which would allow access to the full console

olivercrask commented 6 years ago

I like that idea. When you need it it would be available, then when you release a form the debugging info can be hidden

SimonBiggs commented 6 years ago

Thanks for that insight. It is true that you don't really want all the debugging tools available when you release it to others.

That answers my primary question really. There's no need to make a console, instead I should put the work in sooner rather than later to make it into a jupyterlab extension.

That way, developing a scripted form can be done with super powers inside JupyterLab. And the default ScriptedForms interface doesn't show those errors up the top.

SimonBiggs commented 6 years ago

See #216