Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS2022 and Python v3.13 - python debugging is not working #8112

Closed
vsfeedback opened this issue Dec 11, 2024 · 1 comment
Closed

VS2022 and Python v3.13 - python debugging is not working #8112

vsfeedback opened this issue Dec 11, 2024 · 1 comment
Assignees

Comments

@vsfeedback
Copy link

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


[severity:It's more difficult to complete my work]
Debugging .py files does not work after upgrading to Python v3.13 failing with following error:

Traceback (most recent call last):
  File "c:\program files\microsoft visual studio\2022\professional\common7\ide\extensions\microsoft\python\core\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_comm.py", line 275, in _on_run
    self.process_net_command_json(self.py_db, json_contents)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\program files\microsoft visual studio\2022\professional\common7\ide\extensions\microsoft\python\core\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_process_net_command_json.py", line 219, in process_net_command_json
    cmd = on_request(py_db, request)
  File "c:\program files\microsoft visual studio\2022\professional\common7\ide\extensions\microsoft\python\core\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_process_net_command_json.py", line 532, in on_launch_request
    return self._handle_launch_or_attach_request(py_db, request, start_reason="launch")
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\program files\microsoft visual studio\2022\professional\common7\ide\extensions\microsoft\python\core\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_process_net_command_json.py", line 521, in _handle_launch_or_attach_request
    self._set_debug_options(py_db, request.arguments.kwargs, start_reason=start_reason)
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\program files\microsoft visual studio\2022\professional\common7\ide\extensions\microsoft\python\core\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_process_net_command_json.py", line 493, in _set_debug_options
    self.api.stop_on_entry()
    ~~~~~~~~~~~~~~~~~~~~~~^^
  File "c:\program files\microsoft visual studio\2022\professional\common7\ide\extensions\microsoft\python\core\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_api.py", line 988, in stop_on_entry
    info.update_stepping_info()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "c:\program files\microsoft visual studio\2022\professional\common7\ide\extensions\microsoft\python\core\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_additional_thread_info_regular.py", line 204, in update_stepping_info
    _update_stepping_info(self)
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "c:\program files\microsoft visual studio\2022\professional\common7\ide\extensions\microsoft\python\core\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_additional_thread_info_regular.py", line 278, in _update_stepping_info
    if info._get_related_thread() is not None:
       ~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "c:\program files\microsoft visual studio\2022\professional\common7\ide\extensions\microsoft\python\core\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_additional_thread_info_regular.py", line 138, in _get_related_thread
    if thread._is_stopped:
       ^^^^^^^^^^^^^^^^^^
AttributeError: '_MainThread' object has no attribute '_is_stopped'

Original Comments

Feedback Bot on 12/5/2024, 11:30 PM:

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.

@StellaHuang95
Copy link
Contributor

Thanks for reaching out. Older version of VS doesn't support the latest version of Python. You'd have to use an older version of Python like 3.9.

Visual Studio 17.13 will have support for 3.13. If you update to the latest preview version of Visual Studio, it should also work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants