Open cmcconomyfwig opened 1 year ago
Thanks for Feedback will inform you on this asap.
Thanks for Feedback will inform you on this asap.
I've also attempted the following:
az webapp create-remote-connection <...>
to create an ssh tunnel to the functionroot@127.0.0.1:<port>
Docker!
as provided by step 1 aboveIn this case, VSCode goes into a reconnection loop while trying to establish its vscode server footprint. I tried toggling the vscode setting "Use FLock" as I've seen advised in some places, but it didn't change anything.
@cmcconomyfwig you can refer this document.for feature will do in future and update . https://code.visualstudio.com/docs/editor/debugging#_remote-debugging
@cmcconomyfwig you can refer this document.for feature will do in future and update . https://code.visualstudio.com/docs/editor/debugging#_remote-debugging
Have you successfully connected to a cloud python function instance following these directions? I'd like to figure out how to get the debug session going.
@cmcconomyfwig Thanks for reporting this feature request. We currently do not support remote debugging. We have added this feature request to our backlog and will update this github issue with any progress.
@cmcconomyfwig Thanks for reporting this feature request. We currently do not support remote debugging. We have added this feature request to our backlog and will update this github issue with any progress.
Thank you.. i believe the most direct way to support this would be to troubleshoot the vscode remote ssh capability
Update for anyone who visits;
It appears that sometimes, the VSCode Remote-SSH extensions works when operating through the localhost ssh session you can establish as above via az webapp create-remote-connection
!
After this point, I had to:
./.vscode
- this means you can't mount directly into a read only file system such as that created by a zip-deploy)apt install pdb
which is required by vscode pythonms-python.python
plugin on the remote vscode serveryourpid
/home/site/wwwroot/
Hope this helps anyone else looking for this.
tldr: I am looking for a way to successfully remotely debug a python function running in an azure function app instance
I wish to be able to connect VSCode's remote debugger to a running python instance on Azure.
I got as far as
pip install debugpy
and, ssh'ing into my azure environment from/home/site/wwwroot
:PATH=$PATH:/usr/share PYTHONPATH=./.python_packages/lib/site-packages/ python3 -m debugpy --listen localhost:9000 --pid <pid>
wherepid
is fromls -lrt | grep python
.I get the following error:
I do think the following line from the above dump is key:
/bin/sh: 1: gdb: Permission denied
Locally, on my mac, I can connect using debugpy's
debugpy.listen(("0.0.0.0", port))
-- but from my limited understanding, the remote isn't working becausegdb
either isn't distributed in the provided python container, OR user permissions aren't right (although when I ssh into the server I am root!) -- or, perhaps the container is missing certain permission grants?Can you let me know how I can remote-debug a python app running inside Azure?