Possible to debug scripter script?

Previous topic - Next topic

Juha

I am running python scripts in Scribus scripter. I would like to debug these scripts. I an using system default python interpreter as instructed here: https://wiki.scribus.net/canvas/Windows_Full_Python_Integration. I am using PyCharm IDE for python but the problem is that running scripter script cannot be found in PyCharm "attach to process" list. Is there any way to debug Scribus scripts?

a.l.e

I don't know if there is a way to do it, but I can image that there is none. (or none that is easy to activate).

What I've done in the past, is to mock the Scripter API and run the script outside of Scribus.

You can see here, how such a "Scribus" class can look like:

https://github.com/aoloe/scribus-script-repository/blob/master/typographic-grid/typographic-grid.py

during the lunch break, I'll create a "standalone" script that one import the code.

if you start using the code, please contribute back your changes! (currently, the class only contains the methods I was using)

Juha

To create class named Scribus is the method I am already used and it has been helpful to find errors in script. Anyway it is not running in Scribus and is a kind of poor man alternative.

a.l.e

yeah, that's no solution , i know!

feel free to contribute enhancement to https://github.com/aoloe/scribus-script-repository/tree/master/mockAPI , though...

and if you find a real solution, don't forget to share it in here :-)