Somebody knows if remote debbugging is working and how this must be setup with OO/LO to debug Python macros?
It's not the problem to use the OO/LO Python interpreter in IDEs like Pycharm but the most interesting thing would be to use the debbugging features of this IDEs.
[Solved] Python Debugging with external IDE
[Solved] Python Debugging with external IDE
Last edited by Hagar Delest on Wed Apr 10, 2013 12:20 pm, edited 1 time in total.
Reason: tagged [Solved].
Reason: tagged [Solved].
Openoffice 4.0.2/Windows 8
Re: Python Debugging with external IDE
I do not know about PyCharm well but I have debugged my python macro with Eclipse + Pydev with the following line:
It needs files from eclipse/plugins/org.python.pydev.pydev_xxx/pysrc, copy them in profile/Scripts/python/pythonpath/pydev and add __init__.py into it.
Code: Select all
import pydev.pydevd; pydev.pydevd.settrace()
Edit: pydev files can be found in plugins/org.python.pydev_VERSION.DATE/pysrc With python3, importing from pythonpath/pydev has problem. Try something like: Code: Select all
|
Last edited by hanya on Wed Apr 10, 2013 8:29 am, edited 1 time in total.
Please, edit this thread's initial post and add "[Solved]" to the subject line if your problem has been solved.
Apache OpenOffice 4-dev on Xubuntu 14.04
Apache OpenOffice 4-dev on Xubuntu 14.04
Re: Python Debugging with external IDE
Some good hint! I remember pydev...hanya wrote:I do not know about PyCharm well but I have debugged my python macro with Eclipse + Pydev with the following line:It needs files from eclipse/plugins/org.python.pydev.pydev_xxx/pysrc, copy them in profile/Scripts/python/pythonpath/pydev and add __init__.py into it.Code: Select all
import pydev.pydevd; pydev.pydevd.settrace()
I got this working with pydev... Unfortunately introspection seems not to work "None: pyuno object" for XSpreadsheet etc. So it's not really usable. Have you got this working so it shows also this stuff?
Openoffice 4.0.2/Windows 8
Re: Python Debugging with external IDE
It seems PyCharm uses Pydev for remote debugging from its documentation but I'm not really sure.
Did you try it wih LibreOffice 4.0.X and Python 3.3? Its dir functionality is broken, if the introspection depends on it, it does not work with that.
I did not notice it. But it might be caused by the incomplete implementation of the pyuno object.Have you got this working so it shows also this stuff?
Did you try it wih LibreOffice 4.0.X and Python 3.3? Its dir functionality is broken, if the introspection depends on it, it does not work with that.
Please, edit this thread's initial post and add "[Solved]" to the subject line if your problem has been solved.
Apache OpenOffice 4-dev on Xubuntu 14.04
Apache OpenOffice 4-dev on Xubuntu 14.04
Re: Python Debugging with external IDE
I have not used a external Python installation from OO (Afaik this needs some bigger work to get it running) but I use Python 3.3.1 from Pydev and with the actual Libreoffice (4.0.2) with the same effect.
I have no idea if this is a bug or a incomplete implementation so the interfaces/properties etc. are not seen from the debugger inside Pydev.
Only for the introspection stuff Xray works fine but I'm more interested to have a full usable debugging environment. With Pydev is a good idea and it works very easy... but the problem with the "None: pyuno object" is still there
I have no idea if this is a bug or a incomplete implementation so the interfaces/properties etc. are not seen from the debugger inside Pydev.
Only for the introspection stuff Xray works fine but I'm more interested to have a full usable debugging environment. With Pydev is a good idea and it works very easy... but the problem with the "None: pyuno object" is still there
Openoffice 4.0.2/Windows 8
Re: Python Debugging with external IDE
I tested remote debugging by PyDev with python instance working inside AOO 4 dev and LO 4.0.1.2.
The introspection was worked with AOO4 but not with LO4.
Here is small hack for pydevd_resolver.py to be introspection working in DefaultResolver._getPyDictionary method:
So, the problem is caused by lacking __dir__ function from pyuno object of LO.
The introspection was worked with AOO4 but not with LO4.
Here is small hack for pydevd_resolver.py to be introspection working in DefaultResolver._getPyDictionary method:
Code: Select all
--- /home/asuka/.config/libreoffice/4/user/Scripts/python/pydev/pydevd_resolver.py 2013-04-10 15:15:35.775676524 +0900
+++ /mnt/hd/34/user/Scripts/python/pythonpath/pydev/pydevd_resolver.py 2013-03-15 22:39:24.000000000 +0900
@@ -162,8 +162,6 @@
filterBuiltIn = True
names = dir(var)
- if not names and hasattr(var, "__members__"):
- names = var.__members__
d = {}
#Be aware that the order in which the filters are applied attempts to
Please, edit this thread's initial post and add "[Solved]" to the subject line if your problem has been solved.
Apache OpenOffice 4-dev on Xubuntu 14.04
Apache OpenOffice 4-dev on Xubuntu 14.04
Re: Python Debugging with external IDE
Yeah, your hack is working! Hopefully this will be fixed very soon.
Openoffice 4.0.2/Windows 8
Re: [Solved] Python Debugging with external IDE
This is the one reported: https://bugs.freedesktop.org/show_bug.cgi?id=50470
Please, edit this thread's initial post and add "[Solved]" to the subject line if your problem has been solved.
Apache OpenOffice 4-dev on Xubuntu 14.04
Apache OpenOffice 4-dev on Xubuntu 14.04