bluebird75 / winpdb

Fork of the official winpdb with improvements
Other
91 stars 24 forks source link

Namespace not working on Python 2.7 #28

Open moon6969 opened 5 years ago

moon6969 commented 5 years ago

I'm using winpdb-reborn v1.5.0 on Python 2.7.

The debugger itself seems to work, but the Namespace frame stays stubornly empty.

I found this related (and very old) issue on original winpdb sourceforge site.

However, I can't figure out how to "start the winpdb UI client with the --debug flag"?

Happy to get my hands dirty, but not sure where to start?

NB: In pdb I can "p n" to print the variable n, but I'm not sure how to do the same in rpdb2...

> eval(n)
N/A
mmhere commented 5 years ago

2.0.0.dev5 shows the namespace panel but you cannot click on it. this is with Python3.5 on Ubuntu 16.04 (MATE flavour).

this means you cannot resize columns nor scroll when lots of locals become active. also you cannot select globals nor exceptions tabs.

you also cannot click in the stack frame to view another frame while stopped say further down the call stack.

(I know Python3 is not quite yet there with this but I thought I'd mention these behaviours.)

moon6969 commented 4 years ago

After further investigation, my issue was caused since Python 2.7 no longer support 'sets' module - it has been replaced with builtin set/frozenset commands.

Crude fix for WINPDB_1_5_0 release...

Comment out/delete the is_py3k() check shown below and unindent the "class sets:" section. Before:

if is_py3k():
    class sets:
        Set = _stub_type
        BaseSet = _stub_type
        ImmutableSet = _stub_type

After:

#if is_py3k():
class sets:
    Set = _stub_type
    BaseSet = _stub_type
    ImmutableSet = _stub_type

@mmhere Since you are running Python 3, this particular 'sets' issue is already handled - so your issue appears unrelated.