Beyond simple scripts, FreeCAD macro development really benefits from using a Python IDE. My Python IDE of choice is PyCharm.
I have been able to setup the same Python environment with FreeCAD and PyCharm using this great project https://github.com/FreeCAD/FreeCAD_Conda.
This allows the same Python syntax and semantics to be applied (especially important when switching from Python 2 to Python 3). Unfortunately however, having code completion for FreeCAD modules still eludes me…