I want to execute a python function in vs code directly when I set a breakpoint when debugging. Just like Immediate window on Visual Studio
I believe you can set the break-point and in Debug tab add configuration Django. And then run debugging.
Like this:
Hope this will help!