Skip to content

Issues Attaching Debugger to Python Application #8052

@vsfeedback

Description

@vsfeedback

This issue has been moved from a ticket on Developer Community.


We have an Embedded Python specific application that we can’t use breakpoints when attaching with the debugger using Visual Studio 2022. Visual Studio 2017 does not have the issue.

We can successfully debug with Python 3.7.7 and Visual Studio 2017 with breakpoints using these steps:

  1. Run the application
  2. In Visual Studio 2017, go to Debug > Attach to Process
  3. Set connection type: as local
  4. Set Code type to Python code

We can successfully attach to the process, but not use breakpoints, with Visual Studio 2022 with these steps:

  1. Run the application
  2. In Visual Studio, go to Debug > Attach to Process
  3. Set connection type: as local
  4. Set Code type to Python (native) code

If we use Python code instead of Python (native), we get the following error or something similar:

“Failed to launch debug adapter. Timed out waiting for debug server to connect.”

If we compile the application and run the debugger through the sln, we can debug the C++ code. We cant debug py code this way either.


Original Comments

Tim Lakdawala on 10/30/2024, 08:56 AM:

(private comment, text removed)

Tim Lakdawala on 10/30/2024, 09:02 AM:

(private comment, text removed)

Feedback Bot on 10/30/2024, 09:39 AM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.


Original Solutions

Feedback Bot solved on 10/30/2024, 04:57 PM, undefined votes:

Thanks for taking the time to report this issue! It seems to us that it’s describing the same thing as another one. We’ve closed this one as a duplicate and transferred all votes from this ticket to the other one. Please follow along on the linked ticket to communicate with the team, see updates on status, and help provide any needed diagnostic info. For more information, see our issue reporting guidelines.

Happy coding!

Tim Lakdawala on 10/31/2024, 03:06 AM:

Could we please get a link to the ticket this was moved over to? I don’t see one in the resolution.

Tim Lakdawala on 10/31/2024, 06:13 AM:

I never received the link to the other ticket so I can’t confirm if they are different.

Lisa Gao (CSI Interfusion Inc) [MSFT] on 11/1/2024, 01:14 PM:

Hi, this issue was traced by #6993.

Tim Lakdawala on 11/2/2024, 01:18 AM:

Hey Lisa,

Thanks for sharing the github issue. The issue isnt exactly our issue. In our case we are attempting to attach to an already compiled exe that has embedded python. Can we please have this request reopened?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions