Hello Prefect community, I have a question about debugging flow locally... How can I set actual brea...
m
Hello Prefect community, I have a question about debugging flow locally... How can I set actual breakpoints in VSCode for deployments ran using
.serve
and invoked using
run_deployment
. For my example here below, if I set a breakpoint within the function using the
@flow
decorator it will not stop execution but if I put a breakpoint in the function without a
@flow
or
@task
decorator it will stop execution and show me all the variables that I would expect. What is the recommended design pattern that we should use. If we use pdb we have to hardcode breakpoints, but if we use the vscode debugger we have to create an anti-pattern by wrapping functions with a flow that calls that function...
Copy code
def tester():
    context = FlowRunContext.get()
    return context

@flow(log_prints=True, on_cancellation=[cancel_subflows])
async def base():
    
    context = tester()

    current_flow_run_id = context.flow_run.id