Python debugger, python editor

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
mumme
Posts: 35
Joined: Sun Jun 21, 2015 4:52 pm

Python debugger, python editor

Postby mumme » Mon Apr 17, 2017 6:53 pm

Hi!

Just to let you know...

I have started to make the builtin python debugger workable, and did some fixes to the editor to make it more user friendly.
The codebase already had some functionality for a python debugger, so I mostly got that thing to work and added a stacktrace viewer and a variable explorer.

The end goal is of course to have this patch merged, although it certainly isn't there yet.

I managed to make the debugger work on my Linux machine (with some bugs of course).
It currently only works with one file and cant trap events.
I'm not sure really why events doesn't gets routed through the tracer function.

In any case you can find it at https://github.com/mumme74/FreeCAD/tree/editor_fixes

Regards
Fredrik Johansson
Attachments
screen_frecad-2017-04-17 20-50-17.png
screen_frecad-2017-04-17 20-50-17.png (444.74 KiB) Viewed 1790 times
User avatar
Kunda1
Posts: 5943
Joined: Thu Jan 05, 2017 9:03 pm

Re: Python debugger, python editor

Postby Kunda1 » Mon Apr 17, 2017 8:15 pm

Nice!
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
chrisb
Posts: 19681
Joined: Tue Mar 17, 2015 9:14 am

Re: Python debugger, python editor

Postby chrisb » Tue Apr 18, 2017 3:05 pm

Thanks for that work! It is a big step forward!
triplus
Posts: 8802
Joined: Mon Dec 12, 2011 4:45 pm

Re: Python debugger, python editor

Postby triplus » Tue Apr 18, 2017 4:43 pm

It looks interesting!
User avatar
easyw-fc
Posts: 2692
Joined: Thu Jul 09, 2015 9:34 am

Re: Python debugger, python editor

Postby easyw-fc » Wed Apr 19, 2017 10:33 am

mumme wrote:Hi!

Just to let you know...
thx so much! Looking forward to see it merged ;)

Maurice
User avatar
Kunda1
Posts: 5943
Joined: Thu Jan 05, 2017 9:03 pm

Re: Python debugger, python editor

Postby Kunda1 » Tue Apr 25, 2017 5:53 pm

Any plans for tab completion?
(X-post https://forum.freecadweb.org/viewtopic.php?f=10&t=22029 )
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
Kunda1
Posts: 5943
Joined: Thu Jan 05, 2017 9:03 pm

Re: Python debugger, python editor

Postby Kunda1 » Fri Apr 28, 2017 7:39 pm

Reference: issue #069 - python debugger/editor
&
issue #573 - Macro editor feature requests

Edit: added 573 and ticket titles
Last edited by Kunda1 on Sat Apr 29, 2017 12:57 pm, edited 1 time in total.
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
Kunda1
Posts: 5943
Joined: Thu Jan 05, 2017 9:03 pm

Re: Python debugger, python editor

Postby Kunda1 » Sat Apr 29, 2017 12:04 pm

mumme wrote: The end goal is of course to have this patch merged, although it certainly isn't there yet.

I managed to make the debugger work on my Linux machine (with some bugs of course).
It currently only works with one file and cant trap events.
I'm not sure really why events doesn't gets routed through the tracer function.

In any case you can find it at https://github.com/mumme74/FreeCAD/tree/editor_fixes
What bugs are you encountering?
Can u start an issue queue so if others want to jump in they can and report or fix said issues?
Are you using any 3rd party libs?
Does the console support tab completions like in an IDE?
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
Kunda1
Posts: 5943
Joined: Thu Jan 05, 2017 9:03 pm

Re: Python debugger, python editor

Postby Kunda1 » Mon May 15, 2017 5:31 pm

Please keep us posted!
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
mumme
Posts: 35
Joined: Sun Jun 21, 2015 4:52 pm

Re: Python debugger, python editor

Postby mumme » Wed May 17, 2017 6:37 pm

Kunda1 wrote:Any plans for tab completion?
(X-post https://forum.freecadweb.org/viewtopic.php?f=10&t=22029 )
Hi,
Sorry for the late response, is currently busy with other stuff (real life commitments).

Regarding tab completion, I thought about improving code completion/documentation tooltips, I haven't realy got my head around that how just yet.

Autoindent in editor should work though.
What bugs are you encountering?
*Some strange sementation faults on close,
*events from Pyside dosent work
*debugging into function/method in another file isn't ready yet
Can u start an issue queue so if others want to jump in they can and report or fix said issues?
Hum yes I suppose I could, though I must warn you that my free time for coding isnt that predictable. It might take a long time between coding stints.
Are you using any 3rd party libs?
Not yet, was thinking about using one for the code introspection.
Does the console support tab completions like in an IDE?
I haven't really done any changes to the console? (other than parenthesis matching, which is inherited fixes for code editor)
Or perhaps I misunderstood what you meant?