diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000000000000000000000000000000000000..daab14f5abeb69e5fdbd83b734420e726358aaca --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,24 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Python: Remote Attach", + "type": "python", + "request": "attach", + "connect": { + "host": "localhost", + "port": 5678 + }, + "pathMappings": [ + { + "localRoot": "${workspaceFolder}", + "remoteRoot": "." + } + ], + "justMyCode": true + } + ] +} \ No newline at end of file diff --git a/Mirador_backend/app.py b/Mirador_backend/app.py index cfaa7acd21c9b3161ee706a2314e81a62fcb0bae..5f34f14842540572fc9cffeee909485c32f0b9df 100644 --- a/Mirador_backend/app.py +++ b/Mirador_backend/app.py @@ -7,6 +7,12 @@ from Mirador_backend.routes import v1 from Mirador_backend.utils.config import getConfig from Mirador_backend.utils.database import db + +import debugpy +# TODO Update debugger +debugpy.listen(("0.0.0.0", 5678)) + + app = Flask(__name__) api = Api(app) docs = FlaskApiSpec(app) @@ -21,5 +27,11 @@ def shutdown_session(exception=None): db.close() + if __name__ == '__main__': app.run(debug=True) + + + + +print('COucou') \ No newline at end of file diff --git a/ports.yml b/ports.yml index ffa57f26d534410bfb21b31fe3acd048fc2c741f..0b03674f54986696a280a47a12c46fa3abceb1b1 100644 --- a/ports.yml +++ b/ports.yml @@ -4,3 +4,4 @@ services: flask: ports: - $FLASK_PORT:5000 + - 5678:5678 # DEBUG ports diff --git a/setup.py b/setup.py index 0f9c64788b274944dd210bd37f4159e665bc5cd9..c437ef3445de2bebcab7367f50c7920540b13698 100644 --- a/setup.py +++ b/setup.py @@ -41,6 +41,7 @@ setup( "python-dotenv", # For a nice shell "ipython", + 'debugpy' ], setup_requires=[""],