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

Script debugger stalls on big objects #526

klayoutmatthias opened this issue Mar 26, 2020 · 1 comment

Script debugger stalls on big objects #526

klayoutmatthias opened this issue Mar 26, 2020 · 1 comment


Copy link

Problem: the debugger will display the object's "to_s" values in the variable list. Some objects (e.g. huge polygons) deliver very long strings. Generating and showing these strings will stall the debugger.

Solution is to use "repr"/"inspect" for display and stop aliasing "to_s" to "inspect" (Ruby) or "repr" (Python).

@klayoutmatthias klayoutmatthias self-assigned this Mar 26, 2020
klayoutmatthias added a commit that referenced this issue Mar 28, 2020
Problem: the debugger was printing an object's value as string.
The effect is that for big objects "to_s" will deliver huge strings
(e.g. polygons, netlists ...). "inspect" is better (already used
for Python), but it's aliased to "to_s" in Python and Ruby.
Huge strings will stall the debugger.

The solution is to stop this aliasing (Ruby 2.x doesn't do it
itself anymore) and use "inspect" consistently for Python and

Details can still be printed in the console.
Copy link

Hello @klayoutmatthias .

I noticed a change in behavior in python's repr in my scripts and traced back to this issue. I am not sure I understand why we changed repr for python as well. Now instead of showing "(1,2)" it shows "<klayout.dbcore.Point object at 0x110237dc0>", which is much longer. Is that intentional?

Is there any chance we can revert the repr behavior?

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

No branches or pull requests

2 participants