Python debugger, python editor
Re: Python debugger, python editor
Turning this into a FreeCAD-Addon https://github.com/FreeCAD/FreeCAD-addons/issues/30 that can be downloaded through the Addon Manager makes sense so people can test it in a more streamlined way.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Python debugger, python editor
I think this would be rather difficult. The code is in C++ so it needs to be compiled. It seems most of the code is in src/Gui so probably not so simple to split out. If there are interested Win users I can probably make some win test builds but the branch hasn't been rebased on master in a while.Kunda1 wrote: ↑Tue May 30, 2017 1:18 pm Turning this into a FreeCAD-Addon https://github.com/FreeCAD/FreeCAD-addons/issues/30 that can be downloaded through the Addon Manager
"fight the good fight"
Re: Python debugger, python editor
sgrogan wrote:I think this would be rather difficult. The code is in C++ so it needs to be compiled. It seems most of the code is in src/Gui so probably not so simple to split out. If there are interested Win users I can probably make some win test builds but the branch hasn't been rebased on master in a while.Kunda1 wrote: Turning this into a FreeCAD-Addon https://github.com/FreeCAD/FreeCAD-addons/issues/30 that can be downloaded through the Addon Manager
@mumme would you mind rebasing your branch to master so we could run tests on this ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Python debugger, python editor
No problem rebasing, branch here: https://github.com/sgrogan/FreeCAD/commits/editor_fixes
(Travis will fail on my repo as timed out)
"fight the good fight"
Re: Python debugger, python editor
Oh cool. Good news!sgrogan wrote: ↑Tue May 30, 2017 9:57 pmNo problem rebasing, branch here: https://github.com/sgrogan/FreeCAD/commits/editor_fixes
(Travis will fail on my repo as timed out)
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Python debugger, python editor
@sgrogan I think you should build it for win and I'll advertise it so we can get testers. Would it be difficult to build for Linux?sgrogan wrote: ↑Tue May 30, 2017 9:57 pmNo problem rebasing, branch here: https://github.com/sgrogan/FreeCAD/commits/editor_fixes
(Travis will fail on my repo as timed out)
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Python debugger, python editor
Well I realize that I been quiet some maybe to long, apologize for that. I was somewhat overworked on my daytime job as teacher..
In any case, I have now managed to find some more time during my vacation. So I have do some more changes, learning as I go.
Currently I managed to rebase my brash from master, I am not that knoledgable about git so i hope i didn't do something wrong.
I have opened a bug /issue reporter on github as well as wiki, if anybody want to fill in...
Changes since april:
It shows documentation for just arg1 when you type that, arg2 in its place etc.
I have not tried the code on anything other than qt 4.8 python 2.7 and ubuntu 16.10 yet.
I have python 2.7 built with debug symbols, thats why...
For you who have tested it and , thank you for that..
In any case, I have now managed to find some more time during my vacation. So I have do some more changes, learning as I go.
Currently I managed to rebase my brash from master, I am not that knoledgable about git so i hope i didn't do something wrong.
I have opened a bug /issue reporter on github as well as wiki, if anybody want to fill in...
Changes since april:
- Debugger more stable (sure there are more issues to be found though...)
- Debugging into a function in another file opens that file
- Syntax errors are displayed in editor
- Halts on the line of an exception (also has a issues browser widget)
If python lib Jedi is installed (My code is in c++ but calls python code in another separate interpreter, avoids messing up ordinary interpreter) - Code completion available with documentation in tooltip
- Due to Jedi it also makes good guess the type of of assigned variables
- Function arguments displayed above above the line you type
Code: Select all
def myFunction(node, callback):
'''myFunction does.....
:param node: Int, Which node
:param callback: Function, Do something when done
'''
------------------------------------------------------
| Function, Do something when done
| myFunction(node1, callback)
-------------------------------------------------------
myFunc(mynode, # <- cursor )
I have not tried the code on anything other than qt 4.8 python 2.7 and ubuntu 16.10 yet.
I have python 2.7 built with debug symbols, thats why...
For you who have tested it and , thank you for that..
Re: Python debugger, python editor
Thanks mumme!
Edit: @mumme BTW, how can we do this so that the debugger can be installed through FreeCAD-addons ? I've already opened a ticket: https://github.com/FreeCAD/FreeCAD-addons/issues/30
Edit: @mumme BTW, how can we do this so that the debugger can be installed through FreeCAD-addons ? I've already opened a ticket: https://github.com/FreeCAD/FreeCAD-addons/issues/30
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Python debugger, python editor
Well all changes is to FreeCAD Gui so it certainly wont happen without changes to FreeCAD coreKunda1 wrote: ↑Wed Jul 12, 2017 6:25 pm Thanks mumme!
Edit: @mumme BTW, how can we do this so that the debugger can be installed through FreeCAD-addons ? I've already opened a ticket: https://github.com/FreeCAD/FreeCAD-addons/issues/30
Debugger, macro editor, syntaxhighlighter etc are all part of FreeCAD core.
These classes are already there, I only enhanced them.
What would be possible is an external window script editor , like the VBA IDE for ms office or script editor for google docs.
That would be able to handle workbench development as well.
Also I was under the impression that FreeCAD addons was for python only?
All these changes are C++
My driving force behind this is to make it easier for others (and myself) to develop quality scripts, or workbenches, for FreeCAD.
Re: Python debugger, python editor
FYI latest rebased branch is at:
https://github.com/mumme74/FreeCAD/tree/editor_fixes
Issues/Bugs can be opened at: https://github.com/mumme74/FreeCAD/issues
https://github.com/mumme74/FreeCAD/tree/editor_fixes
Issues/Bugs can be opened at: https://github.com/mumme74/FreeCAD/issues
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs