-
Notifications
You must be signed in to change notification settings - Fork 520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dockerrun task overwrites docker entry point with just python3 call not my app invokation #3641
Comments
Overriding to use Still, I'd expect that, following the tutorials, everything should just work, so I'm going to take a look. At a glance everything seems correct so I'm not sure why it's not debugging correctly. |
I haven't been able to reproduce, and nothing stands out in your config. Are you able to share your app.py or part of it? |
@bwateratmsft from flask import Flask
from flask import request
from werkzeug.middleware.profiler import ProfilerMiddleware
from service.service import start_task
from service.requests import Request
app = Flask(__name__)
app.wsgi_app = ProfilerMiddleware(app.wsgi_app, profile_dir="./code-profiles", sort_by=("cumtime",), restrictions=(0.2,))
@app.route("/", methods=['GET'])
def home():
return "Hello, Flask" |
I will try to make a new project from scratch and see if it helps |
It still has the same issue with the simplest Flask app I can do, all the rest is auto generated as above from flask import Flask
app = Flask(__name__)
@app.route("/", methods=['GET'])
def home():
return "Hello, Flask" |
Have you tried on Win11 with Docker Desktop? |
How can I debug this? |
Yeah, I'm on Win11 with Docker Desktop. What do you have for a Python setup? |
python 3 installed via Anaconda I just had the most basic app start working now. I am not sure what has changed. The first one (this ticket is about) still doesn't, though. I will see if I can get to the element that causes it to break and will message back. Thanks for your assistance, I appreciate it. |
I think I have found the culprit. Let me know if it helps with finding the issue and rectifying it, please. Thanks |
Good catch! I'll try that out myself and see if I can find out what's going on and if there's a workaround or fix. |
There is some additional info that might be useful. My launch and tasks configuration files are located in the project folder at |
Yeah, that was an intentional change we made a few years back. There were problems with launch configs and tasks located in the workspace file (though I'm having trouble remembering what exactly...), the solution was to always do them in |
Sorry for the long delay...it looks like this is the same as #2327, but it may actually be solvable now. We can scope configuration fetches to specific workspace folders, which allows this to work. |
A fix for this was just released in version 1.24.0 of the docker extension, although debugging python in a container may still be blocked by an external bug in the python extension tracked here: #3823 |
I followed a tutorial for Python in container running and debugging on VSCode from here. But the docker launch configuration that VSCode generates for me does not work. When I start it de launch config with F5 the container entry point is overwritten with a call to
python3
only. It does not start my app at all. Please advice, is that a bug in the docker extension?See more details on my config below. It is all standard generated and not really modified.
In terminal output you can see that it sets entry point to
python3
Environment:
Auto generated files:
.vscode/tasks.json
.vscode/launch.json
Dockerfile
The text was updated successfully, but these errors were encountered: