Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: Getting a python environment / debugger working is too difficult #24

Open
sliptonic opened this issue Apr 6, 2023 · 2 comments

Comments

@sliptonic
Copy link
Member

A developer who is used to working with a modern IDE including breakpoints and watch variables is quickly frustrated working on the Python side of FreeCAD.

I've tried all the documented methods on the wiki and in many forum posts and never succeeded in getting a debugger to work with the FreeCAD internal python interpreter.

We should recommend a single environment per platform that we know works. Then if the developer wants to use something different, they at least have a reference platform for how things should behave.

@wwmayer
Copy link

wwmayer commented Apr 7, 2023

winpdb is still working for me -- tested on Xubuntu 22.04.

Installation:

[Desktop Entry]
Version=1.0
Type=Application
Name=winpdb
Comment=
Exec=python3 /home/user/Programs/winpdb-reborn-2.0.0.1/winpdb.py
Icon=python3.10
Path=/home/user/Programs/winpdb-reborn-2.0.0.1/
Terminal=false
StartupNotify=false

Usage:

  • Start winpdb and define a password with File > Password
  • Start FreeCAD and go to Macros > Attach to remote debugger. Enter the same password and click OK.
  • Switch back to winpdb and go to File > Attach. Now you should see the FreeCAD process. Attach to it.
  • Go to Control > Go
  • In order to debug a Python function load the file into winpdb and set a breakpoint
  • Go to FreeCAD and trigger the Python function
  • In winpdb you are able to debug through the function

@yorikvanhavre
Copy link
Member

This works for me too out of the box on debian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants