> cmd /C "c:\Users\{masked}\AppData\Local\Programs\Python\Python311\python.exe c:\Users\{masked}\.vscode\extensions\ms-python.debugpy-2025.0.0-win32-x64\bundled\libs\debugpy\launcher 11138 -- D:\sync\code\python\trysail\_test4.py "
0.77s - Error processing internal command.
Traceback (most recent call last):
File "c:\Users\{masked}\.vscode\extensions\ms-python.debugpy-2025.0.0-win32-x64\bundled\libs\debugpy\_vendored\pydevd\pydevd.py", line 2245, in _do_wait_suspend
internal_cmd.do_it(self)
File "c:\Users\{masked}\.vscode\extensions\ms-python.debugpy-2025.0.0-win32-x64\bundled\libs\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_comm.py", line 565, in do_it
self.method(dbg, *self.args, **self.kwargs)
File "c:\Users\{masked}\.vscode\extensions\ms-python.debugpy-2025.0.0-win32-x64\bundled\libs\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_constants.py", line 531, in new_func
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\{masked}\.vscode\extensions\ms-python.debugpy-2025.0.0-win32-x64\bundled\libs\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_comm.py", line 813, in internal_get_variable_json
py_db.writer.add_command(NetCommand(CMD_RETURN, 0, variables_response, is_json=True))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\{masked}\.vscode\extensions\ms-python.debugpy-2025.0.0-win32-x64\bundled\libs\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_net_command.py", line 80, in __init__
text = json.dumps(as_dict)
^^^^^^^^^^^^^^^^^^^
File "c:\Users\{masked}\AppData\Local\Programs\Python\Python311\Lib\json\__init__.py", line 231, in dumps
return _default_encoder.encode(obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\{masked}\AppData\Local\Programs\Python\Python311\Lib\json\encoder.py", line 200, in encode
chunks = self.iterencode(o, _one_shot=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\{masked}\AppData\Local\Programs\Python\Python311\Lib\json\encoder.py", line 258, in iterencode
return _iterencode(o, 0)
^^^^^^^^^^^^^^^^^
File "c:\Users\{masked}\AppData\Local\Programs\Python\Python311\Lib\json\encoder.py", line 180, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type <__main__.KillDebugpy object at 0x00000179EC1F9E50> is not JSON serializable
Before creating a new issue, please check the FAQ to see if your question is answered there.
Environment data
ms-python.debugpy-2025.0.0-win32-x64Actual behavior
debugpythrows an errorExpected behavior
It should not raise an error in
debugpyor cause VS Code debugging to freeze.Steps to reproduce:
print()This bug was first observed in real-world code (see: mikf/gallery-dl#6582 (comment)), and I then created a minimal reproducible example based on it.