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).
The text was updated successfully, but these errors were encountered:
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
Ruby.
Details can still be printed in the console.
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?
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).
The text was updated successfully, but these errors were encountered: