I'm currently using VS code to write a Blender script in Python. The script places objects, creates materials, unwraps objects, and finally renders an image. I'm using the "Blender Development" extension to make debugging easier. When debugging I can step through the code and see the variables change but no changes are made in the Blender UI until the script ends. Is there a way to have the blender UI change as I step through the code?
Example:
bpy.ops.mesh.primitive_cube_add(size=1)
*Breakpoint* The UI updates to show the created cube
cube_obj = bpy.context.active_object
cube_obj.location.x = 5
*Breakpoint* The UI updates to show the cube move
...
I'm not sure this is possible since I haven't found any information about it. The closest thing I can think of is to create an add-on consisting of a series of buttons that I press sequentially to run the code piece by piece.
All suggestions are appreciated, thanks!