mjhea0 / flask-redis-queue

Example of how to handle background processes with Flask, Redis Queue, and Docker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Debugging the app

chintanp opened this issue · comments

I am trying to extend this template for my usecase.

Can you suggest an easy route for debugging the app, potentially with a capability to apply a breakpoint etc., maybe using VS code?

@chintanp I'd recommend to set up both the flask application and the worker outside of docker. You can of course keep it within, you will just have to make sure the path mappings and debug environment using docker is set up correctly (a little more work imo). Once you have started the worker you can easily set breakpoints within VS code. Redis and rq-dashboard can remain as docker containers, just make sure you expose the ports.

@TimMcCauley I believe the pathMappings effort would be same regardless whether it is within docker of without, right.

It's a little more than only that - https://code.visualstudio.com/docs/containers/debug-python - and setting it up locally will not require path mappings