I'm trying to debug a python script in which passing arguments is required. Since I want to debug, using -b flag is not an option (otherwise there is no problem when running the code in a background mode).
I tried the following thing
filename = "/full/path/to/script.py --Arg1 arg1 ...."
exec(compile(open(filename).read(), filename, 'exec'))
Obviously that didn't work since exec tries to execute a file without additional arguments.
Few notes:
1) If I try to debug w/o passing arguments everything works fine I can debug and do what I want.
2) Some system pros: running docker container with 4 NVIDIA 1080-Ti cards on ubuntu os.
How can this be done?
-bor--backgroundargument? This will start Blender with GUI as usual. – Robert Gützkow May 04 '20 at 11:01bpy.ops.debug.connect_debugger_pycharmif you're using the add-on from the old answer). The second script is the one you would like to test and pass arguments to. It has to be the last CLI argument, followed by the arguments you would like to pass into the script. – Robert Gützkow May 04 '20 at 12:12