Martin T
05/04/2022, 6:08 AM$ prefect run --path myflow.py --log-level INFO --param myparam=val
Here the development flow becomes rather blackboxed/trial-and-error.
Is it possible to somehow set breakpoints in VSCode, start a prefect flow from CLI, and attach the debugger to the python process?
(Running with the LocalExecutor)Martin T
05/04/2022, 6:36 AMKevin Mullins
05/04/2022, 6:36 AMKevin Mullins
05/04/2022, 6:37 AMKevin Mullins
05/04/2022, 6:44 AMimport prefect
from prefect import task, Flow
@task
def say_hello():
    <http://prefect.context.logger.info|prefect.context.logger.info>("hello")
with Flow("test-debug") as flow:
    say_hello()
if __name__ == "__main__":
    flow.run()Martin T
05/04/2022, 6:47 AMKevin Mullins
05/04/2022, 6:48 AM{
  "name": "Python: Flow Debug Example",
  "type": "python",
  "request": "launch",
  "program": "${workspaceFolder}/.venv/bin/prefect",
  "args": [
    "run",
    "--path",
    "dev_flows/debug_flow.py"
  ],
  "console": "integratedTerminal",
  "justMyCode": true
}Martin T
05/04/2022, 6:53 AMKevin Mullins
05/04/2022, 6:56 AMMartin T
05/04/2022, 7:11 AMprogram": "/home/[USER]/.local/share/virtualenvs/[SOURCEFOLDER]-[HASH]/bin/prefect",