开发者

Customizing debug print format with PyDev

开发者 https://www.devze.com 2023-02-02 17:29 出处:网络
Is it possible to see ints (and ints that are parts of dicts, lists, and tuples, etc.) as hex values when debugging with PyDev?

Is it possible to see ints (and ints that are parts of dicts, lists, and tuples, etc.) as hex values when debugging with PyDev?

More broadly, is it possible to make any given data type show up the w开发者_如何学Pythonay you want in the variable display tab?


The PyDev Debugger simply uses the repr() function to show the values. So if overwrite the __repr__() function than you can change how the values are printed.

I don't think there are any other options of changing the way your variables show, although you might (not sure about that) be able to get away with overwriting the repr() function itself.

0

精彩评论

暂无评论...
验证码 换一张
取 消