Hello,
is there a way to debug an extension I have written?
I want to see the values of variables, etc.
Thanks,
bernie70
Debugging Extension
Re: Debugging Extension
Hi
It's possible by using the inkex.debug() function,
when I do extensions I turn debugging on and off
by one statement in the code (at the beginning of the file), like:
'Later' in the code I have something like this;
Hope this helps.
Good Luck
RGDS
Ragnar
It's possible by using the inkex.debug() function,
when I do extensions I turn debugging on and off
by one statement in the code (at the beginning of the file), like:
Code: Select all
debug = True # Turns debugging output on - Use debug = False to turn debugging output 'off'
'Later' in the code I have something like this;
Code: Select all
# Just for 'fun' - report Python version
if debug:
cur_version = sys.version_info
message = "Python version: " + str(cur_version) + "\n"
inkex.debug(message)
# More Code
if debug:
message = ("Using palette files:\n" + inn_file_old + "\n" + inn_file_new + "\n")
inkex.debug(message)
Hope this helps.
Good Luck
RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
( ͡° ͜ʖ ͡°)
RGDS
Ragnar