Description: Story: As a (beginning) Extension Developer I want to be able to inspect/debug existing extensions to find out how they work and also debug my own extensions. I would like to read log output and ideally attach a remote debugger. Steps to Reproduce: After some searching, I was able to find that, for debugging, I need to change pythonscript.py to set LogLevel.use = LogLevel.DEBUG and also need to set the Environment variable PYUNO_LOGLEVEL=ARGS (see https://wiki.openoffice.org/wiki/Python and http://ooo-forums.apache.org/en/forum/viewtopic.php?f=20&t=66276 ) Actual Results: After doing the changes I still could not get any debug output for my code. Remote debugging I did not try, however, it seemed to rely on custom code where I saw such (see: https://github.com/XRoemer/Organon/blob/master/source/py/factory.py#L51) Expected Results: 1) An up-to-date guide to set the needed changes with some examples. Currently all needs to be collected at various places, some being rather old (openoffice-wiki etc.) 2) Better, I switch I can set via command line or even via the GUI that does needed changes for me, thus avoiding mistakes by interfaceing the needed settings. Reproducible: Always User Profile Reset: No Additional Info: User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0
Confirm for LO 6.0.0.0beta x64 Windows 7 There is missing folders to get needed log.txt: 1. Create folder C:\Users\%User%\AppData\Roaming\LibreOfficeDev\4\user\Scripts\python or %LibreofficeUSERDIR%/Scripts/python log.txt is created here 2. in file pythonscript.py set LogLevel.use = LogLevel.DEBUG LOG_STDOUT = False to fix: in pythonscript.py: 1. check folder existence in def getLogTarget(): 2. LOG_STDOUT = os.environ.get(PYSCRIPT_LOG_STDOUT_ENV, "1") != "0" fix this to work well in windows environment
** Please read this message in its entirety before responding ** To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
Xisco, please retest it
"Designing & Developing Python Applications" content in TDF wiki, and recent local/online help Python pages appearing from release 6.3, may partly invalidate Jan's original observations. Remote debuggers can be attached to Python macros. LibO Python files need not be updated anymore, despite past statements in former documentation. However Python, or other language, debugging may still sound "weird" when packed in an extension. I personnally don't foresee improvements with respect to extensions debugging, but I may be wrong. https://wiki.documentfoundation.org/Macros/Python_Design_Guide https://help.libreoffice.org/latest/en-US/text/sbasic/python/main0000.html?DbPAR=BASIC
Discussed the topic with LibreOfficiant and he was still of the opinion that the documentation situation is much better compared to 2017, so we can close.
Dos the pythonscript.py file still need to be edited to activate debugging? (If yous, I would create a separate ticket on the editing files, so we do not need to treat documentation and the problems of activating debugging in the same ticket)
(In reply to jan d from comment #6) > Dos the pythonscript.py file still need to be edited to activate debugging? > (If yous, I would create a separate ticket on the editing files, so we do > not need to treat documentation and the problems of activating debugging in > the same ticket) I don't see anything about that here, please check: https://wiki.documentfoundation.org/Macros/Python_Design_Guide#Debugging_2
I confirm that LibreOffice files do not need to be edited in order to debug a Python script.