Python -Debugger in Visual Studio 2022 funktioniert nicht
Posted: 04 Feb 2025, 23:44
Ich bin in der Visual Studio Community 2022 (64-Bit) ver 17.12.4 und Python 3.13. >
Code wird ordnungsgemäß mit "Start ohne Debuggen" ausgeführt, aber "Debugging" funktioniert nicht. Drücken Sie "Start Debugging": < /p>
Traceback (most recent call last):
File "c:\program files\microsoft visual studio\2022\community\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\community\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\community\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\community\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\community\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\community\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\community\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\community\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\community\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'
< /code>
Ich habe versucht, Python, Python -Entwicklung, .NET -Desktop -Entwicklung und Neustart meines Geräts zu deinstallieren und neu zu installieren. Das gleiche Problem wie ich. Doch auch nach dem Herunterladen der Debugging -Symbole und des Deaktivierens von "Debugging" Native Code "funktioniert der Debugger für mich immer noch nicht.
Code wird ordnungsgemäß mit "Start ohne Debuggen" ausgeführt, aber "Debugging" funktioniert nicht. Drücken Sie "Start Debugging": < /p>
Traceback (most recent call last):
File "c:\program files\microsoft visual studio\2022\community\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\community\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\community\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\community\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\community\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\community\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\community\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\community\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\community\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'
< /code>
Ich habe versucht, Python, Python -Entwicklung, .NET -Desktop -Entwicklung und Neustart meines Geräts zu deinstallieren und neu zu installieren. Das gleiche Problem wie ich. Doch auch nach dem Herunterladen der Debugging -Symbole und des Deaktivierens von "Debugging" Native Code "funktioniert der Debugger für mich immer noch nicht.