You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{
// 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": [
{
"type": "java",
"name": "Debug in Docker",
"request": "attach",
"hostName": "localhost",
"port": "5005"
}
]
}
Activity
yezhengli-Mr9 commentedon Dec 31, 2023
From query like https://www.youtube.com/@learningfromexperience/search?query=python%20docker%20compose%20vscode
do not find relevant video.
yezhengli-Mr9 commentedon Dec 31, 2023
Video Java Debugging in Docker: How to Use VS Code and Docker Compose relevant to spring boot can definitely get debugged even just with
DockerFileyezhengli-Mr9 commentedon Dec 31, 2023
By referring to
(1) Java Debugging in Docker: How to Use VS Code and Docker Compose
(2) https://medium.com/@lassebenninga/how-to-debug-flask-running-in-docker-compose-in-vs-code-ef37f0f516ee
feel at least two points are important to debug in vscode, specifically for
pythonwithdocker-compose(3) https://code.visualstudio.com/docs/containers/docker-compose for
pythonlaunch.json{ // 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": "." } ] } ] }compared to here
DockerFilein (2)python debug with docker-compose in vscode: Error: Could not locate a Flask application. Use the 'flask --app' option, 'FLASK_APP' environment variable, or a 'wsgi.py' or 'app.py' file in the current directory cookiecutter-flask/cookiecutter-flask#1966
services: flask-dev: build: context: . target: development args: <<: *build_args image: "my_flask_app-development" ports: - "8080:5000" - "2992:2992" - "5678:5678" <<: *default_volumesWhile (2) has more steps in
DockerfileRUN pip install debugpyand Add the debugpy command to the launch script
and
package.jsonwhich coincides with hints in (3).
yezhengli-Mr9 commentedon Jan 1, 2024
One attempt is described in microsoft/debugpy#1491 as well as microsoft/debugpy#1296 by following https://code.visualstudio.com/docs/containers/docker-compose