Hello @James Shaw ,
Welcome to Microsoft Q&A forum.
You need to create a new Python related project(or open a Python project) in Visual Studio to debug your project which includes the .py
file and python codes. Just open a single .py
file is not enough to debug the project in Visual Studio, so you will see the “Start” changed to “Attach…”.
Suggestion:
Please try to create a Python project and then copy and paste the Python code from the single .py
file to the project’s .py
file and then debug the whole project.
BTW, for more information about Attach to process
feature, you can refer to this document: Attach to running processes with the Visual Studio debugger.
Best Regards,
Tianyu
- If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.