Python Debugging - pdb++ (python debugger plusplus)

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Buddy Hy
Posts: 32
Joined: Sat Aug 31, 2019 11:30 am

Python Debugging - pdb++ (python debugger plusplus)

Postby Buddy Hy » Sat Sep 21, 2019 8:39 am

Hey Kunda1, I'm looking for the pdbpp code debugger but all I can find is the pdb module. Could you please supply a link to where we can download the pdbpp module?

Mod Edit: This thread was split from another thread because it was off-topic. The context of this thread started from the following youtube video on how to use pdb++

phpBB [video]
Last edited by Kunda1 on Mon Nov 04, 2019 7:03 pm, edited 1 time in total.
User avatar
Kunda1
Posts: 5937
Joined: Thu Jan 05, 2017 9:03 pm

Re: Python Debugging - pdb++ (python debugger plusplus)

Postby Kunda1 » Sat Sep 21, 2019 7:13 pm

Buddy Hy wrote:
Sat Sep 21, 2019 8:39 am
Hey Kunda1, I'm looking for the pdbpp code debugger but all I can find is the pdb module. Could you please supply a link to where we can download the pdbpp module?
You can get it through pypi via pip or through your distribution installer (in Manjaro i use pacman to install it)
https://pypi.org/project/pdbpp/
https://github.com/pdbpp/pdbpp
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
Buddy Hy
Posts: 32
Joined: Sat Aug 31, 2019 11:30 am

Re: Python Debugging - pdb++ (python debugger plusplus)

Postby Buddy Hy » Sun Sep 22, 2019 6:47 am

Awesome Kunda1, I've downloaded the zip file but GitHub doesn't properly detail how to install it - All it says is:
Installation

Since pdb++ is not a valid package name the package is named pdbpp:

$ pip install pdbpp

pdb++ is also available via conda:

$ conda install -c conda-forge pdbpp

Alternatively, you can just put pdb.py somewhere inside your PYTHONPATH.
So do I just replace pdb.py in 'FreeCAD\bin\lib\'?
User avatar
Kunda1
Posts: 5937
Joined: Thu Jan 05, 2017 9:03 pm

Re: Python Debugging - pdb++ (python debugger plusplus)

Postby Kunda1 » Sun Sep 22, 2019 12:34 pm

Buddy Hy wrote:
Sun Sep 22, 2019 6:47 am
Awesome Kunda1, I've downloaded the zip file but GitHub doesn't properly detail how to install it
Yea, their documentation is alarmingly sparse.
I haven't installed a python package manually in a while...
Is there are reason why you're not interested in using a package installer for python...
I'm not a python expert, FYI.
Alternatively, you can just put ``pdb.py`` somewhere inside your
``PYTHONPATH``.
So yea, it seems you can add the location of the pdbpp's pdb.py to the beggining of your PYTHONPATH environmental variable (not sure how to do this on Windows).

Once you install pdbpp it should of automagically become you new python debugger.

Here is a nice indepth page:
https://eecs485staff.github.io/p1-insta ... g-with-pdb

Follow these instructions, they should work.
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
Buddy Hy
Posts: 32
Joined: Sat Aug 31, 2019 11:30 am

Re: Python Debugging - pdb++ (python debugger plusplus)

Postby Buddy Hy » Sun Sep 22, 2019 11:12 pm

I can't see a package installer for pdb++... I wonder if I downloaded the correct file?
Attachments
pdbpp-master.zip
(51.95 KiB) Downloaded 7 times
User avatar
Kunda1
Posts: 5937
Joined: Thu Jan 05, 2017 9:03 pm

Re: Python Debugging - pdb++ (python debugger plusplus)

Postby Kunda1 » Mon Nov 04, 2019 7:04 pm

Buddy Hy wrote:
Sun Sep 22, 2019 11:12 pm
Did it work out ?
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
Buddy Hy
Posts: 32
Joined: Sat Aug 31, 2019 11:30 am

Re: Python Debugging - pdb++ (python debugger plusplus)

Postby Buddy Hy » Tue Nov 05, 2019 12:00 am

Sorry Kunda, I can't remember exactly what I did any more - but I seem to remember that I didn't really need the debugger. Anyways I finished the project, so I suppose this thread can be closed.
Thanks to everyone who tried to help.
User avatar
Kunda1
Posts: 5937
Joined: Thu Jan 05, 2017 9:03 pm

Re: Python Debugging - pdb++ (python debugger plusplus)

Postby Kunda1 » Tue Nov 05, 2019 6:03 pm

I was able to get pdbpp to work without the FreeCAD GUI invoked. Which is nice. I'll post instructions on how to do that. The problem really is that it's not possible to do the same when FC GUI is active.
See:
https://forum.freecadweb.org/viewtopic. ... 66#p345446
https://forum.freecadweb.org/viewtopic.php?f=8&t=40673
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features