Hi,
I’m writing on a plugin for picard, and to simplify debugging I set up a local environment by cloning the picard repository and following the ‘Running From the Source Tree’ section in INSTALL.md.
Using vscode in windows to build and run picard works fine, and the plugin is loaded and executed after placing it in the picard/plugins directory of the repository.
My only issue that breakpoints in the plugin don’t halt the execution of the program. It works fine for the main application itself, but if I set a breakpoint anywhere in the plugin code it’s only touched one time at the start at the program, but never when the plugin actually runs.
I can see from the log that everything, including the plugin itself, is properly executed, breakpoints are just skipped for some reason.
I’m not super experienced with python, so it could be something super obvious that I’m not aware of. Is there any guidance or hints at what might be wrong with my environment?
Nevermind. Right after writing this I found it. Before building the binaries I already had picard installed locally, and didn’t realize that the self-built version would just reuse all settings from the installed version stored in %appdata%, which also contained the script.
So I basically set the breakpoints on the script I copied into the plugins folder from the github repository, but they were also still in the %appdata% plugins folder, and my locally built version of picard would load those.
I just need to figure out how to tell that version of picard to act like a portable version and I’m pretty much golden. Please consider this issue solved.
3 Likes
Glad you have it solved. I would have suspected something like this with different actual plugin location.
Regarding behaving like the portable: the portable is setting the (otherwise undocumented) environment variables PICARD_CONFIG_DIR
, PICARD_CACHE_DIR
and PICARD_PLUGIN_DIR
.
See picard/scripts/pyinstaller/portable-hook.py at master · metabrainz/picard · GitHub
3 Likes
Awesome, now I know that as well. Thanks for the help!
2 Likes