Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Michael Meeks wrote:
      Cool :-) incidentally, debugging python problems can be really nasty;
there is some code in this commit:

Since we chatted about that on LinuxTag - what I tend to do, is
install the extension (such that all auxiliary files are available),
start libreoffice with an extra

 --accept="uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext"

parameter, and then have

if __name__=="__main__":
    localContext = uno.getComponentContext()
    resolver = localContext.ServiceManager.createInstanceWithContext(
        "com.sun.star.bridge.UnoUrlResolver", localContext )
    ctx = resolver.resolve(
        "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext")
    ctx.ServiceManager...

at the bottom of your Python - so you can run your extension
out-of-process, and use whatever debugging you prefer (interactive,
pdb, etc).

HTH,

-- Thorsten

Attachment: pgpJxvvh5cOIy.pgp
Description: PGP signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.