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

Have debugger break on unhandled exceptions #416

Open
Jerther opened this issue Sep 29, 2023 · 4 comments
Open

Have debugger break on unhandled exceptions #416

Jerther opened this issue Sep 29, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@Jerther
Copy link

Jerther commented Sep 29, 2023

Hi!

I've been trying to make this work for years now, with no success. Pycharm stops fine on unhandled exceptions for projects outside Odoo, but it won't when debugging modules inside Odoo. I believe it has something to do with Odoo's way of handling exceptions so they bubble up into the UI.

For example, I cannot have Pycharm break on a line like x = 10 / 0. For years I've just fiddled with conditional break points and wasting time.

Is this something pycharm-odoo could fix?

@trinhanhngoc
Copy link
Member

Hello @Jerther , This is an interesting problem. I will research to see if we can fix it.

@trinhanhngoc trinhanhngoc added the enhancement New feature or request label Oct 18, 2023
@Jerther
Copy link
Author

Jerther commented Mar 13, 2024

Hello @trinhanhngoc , any update on this possible enhancement?

@trinhanhngoc
Copy link
Member

trinhanhngoc commented Mar 13, 2024

Hello @Jerther ,

I think that because these exceptions are handled by Odoo (https://github.com/odoo/odoo/blob/96e3782a146249fede5130c3e048cfdf5adadcdd/odoo/http.py#L2194), PyCharm cannot capture them by default. The information in this PyCharm blog post (https://blog.jetbrains.com/pycharm/2024/01/new-low-impact-monitoring-api-in-python-3-12) may help me figure out a solution for our problem.

@Jerther
Copy link
Author

Jerther commented Mar 13, 2024

New in Python 3.12. Not sure if Odoo 15 supports it! But still good news as we'll get there eventually. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants