MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.25k stars 21.42k forks source link

Suggestion: Add description for debug python with IoT Edge Simulator #47406

Closed th3ragex closed 4 years ago

th3ragex commented 4 years ago

The manual describing IoT Edge debugging possibility with VS-Code does not mention the option to debug python modules with the IoT Edge Simulator.

Chapter: "Debug in attach mode with IoT Edge Simulator (C#, Node.js, Java, Azure Functions)" excludes python more or less explicitly.

Also 'https://github.com/Azure/iotedgedev' states:

IoT Edge Simulator does not support running Python and C modules yet. You'll need IoT Edge Runtime to run your Python and C modules.

Nonetheless, I managed to debug my python modules with the Simulator by just adding

import ptvsd
ptvsd.enable_attach(('0.0.0.0',  5678))

as mentioned in the "Debug a module with the IoT Edge runtime" chapter. (without ptvsd.break_into_debugger() and any edge device online)

Environment: Ubuntu 19.10, Python 3.7.5 64bit, ptvsd=4.3.2 Solution: Only two python3 amd64 edge modules created by the default template with basic additions.

If this is an officially supported feature please add some description to the manual.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Mike-Ubezzi-MSFT commented 4 years ago

@th3ragex Thank you for this contribution. I am going to assign this to the content team to be reviewed for a documentation enhancement. Additionally, customers have the ability to contribute to the documentation. Please see the following guide: Microsoft Docs contributor guide overview Again, thank you for taking the time to provide this detailed feedback.

shizn commented 4 years ago

This issue has been fixed in the https://github.com/Azure/iotedgedev repo. Thanks!

AshokPeddakotla-MSFT commented 4 years ago

We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.