This shows you the differences between two versions of the page.

Link to this comparison view

tutorials:freecad:debug [2019/05/12 10:18] (current)
alanzheng created
Line 1: Line 1:
 +===== How to debug FreeCAD python module =====
 +  - install winpdb-reborn by **python -m pip install winpdb-reborn** at FreeCAD directory
 +  - launch FreeCAD, Add below macro, and F6 to execute it.
 +import rpdb2
 +import FreeCAD
 +import Part
 +import Draft
 +print ("​hello"​)
 +import Draft
 +  - The FreeCAD will hang up now because of **rpdb2.start_embedded_debugger("​test"​)** break point
 +  - Start winpdb, and attach the process with the password **test**
 +  - Happy debug!