[split] Debugging scripts basics - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: [split] Debugging scripts basics (/thread-26234.html) |
[split] Debugging scripts basics - tultalk - Apr-24-2020 (Apr-24-2020, 02:58 AM)buran Wrote: Why not use an IDE with debugging?What is a good IDE w/debugging to use in 2.7? I am using the pdb and can't get breakoiint to work: python -m pdb /usr/local/lib/python2.7/dist-packages/examples/simpletest.py (Pdb) b Adafruit_ADS1x15/ADS1x15.py:134 Response: Breakpoint 1 at /usr/local/lib/python2.7/dist-packages/Adafruit_ADS1x15/ADS1x15.py:134 (Pdb) run Restarting /usr/local/lib/python2.7/dist-packages/examples/simpletest.py with arguments: (Pdb) commands 1 (com) print result[1] (com) end (Pdb) rDoes not stop at breakpoint postmortom: (Pdb) c Reading ADS1x15 values, press Ctrl-C to quit... | 0 | 1 | 2 | 3 | ------------------------------------- Why not stopping on breakpoint and showing value?Thanks RE: [split] Debugging scripts basics - deanhystad - Apr-24-2020 I've used PyCharm Community and Visual Studio Code on Windows. Both are free and I think they work pretty well. I think you can tell either which python or virtual environment they are supposed to use. RE: [split] Debugging scripts basics - Larz60+ - Apr-24-2020 As a former PyCharm user. I's recomment VSCode. Tutorial here: https://python-forum.io/Thread-VS-Code-from-start?highlight=VSCode RE: [split] Debugging scripts basics - deanhystad - Apr-24-2020 VS Code is pretty good. Especially if you are using kite. RE: [split] Debugging scripts basics - bowlofred - Apr-24-2020 It looks to me like you set a breakpoint for line 134 in ADS1x15.py. But your traceback shows an error was thrown from line 133 of that file. So I suspect that line 134 was never reached. Try setting a breakpoint before line 133. RE: [split] Debugging scripts basics - menator01 - Apr-25-2020 Off topic but kind of lean toward atom myself. Free, has lots of community support, and many plugins to help with coding. |