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
{{ message }}
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.
Use pyenv to install Python 3.6 and fix path (see supported Python versions)
brew upgrade aws/tap/aws-sam-cli
sam init --runtime python3.6 --name python-debugging
cd python-debugging
Edit: hello_world/requirements.txt and add the line: ptvsd
Update hello_world/app.py add the following code after the last import
import ptvsd
print('waiting for debugger... you should start it now')
# Enable ptvsd on 0.0.0.0 address and on port 5890 that we'll connect later with our IDE
ptvsd.enable_attach(address=('0.0.0.0', 5890), redirect_output=True)
ptvsd.wait_for_attach()
print('debugger attached')
Closing this issue or pull request in advance of archiving this repo. For more information about the decision to archive this repo (and others in the "awsdocs" org), see the announcement on the AWS News Blog.
https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-using-debugging-python.html#serverless-sam-cli-using-debugging-python-ptvsd
Steps for VS Code on OSX
brew upgrade aws/tap/aws-sam-cli
sam init --runtime python3.6 --name python-debugging
cd python-debugging
hello_world/requirements.txt
and add the line:ptvsd
hello_world/app.py
add the following code after the last importsam build
sam local invoke -d 5890 --no-event
Additional recommendations
template.yaml
? continuing handler, code andrequirements.txt
?The text was updated successfully, but these errors were encountered: