diff --git a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command.py b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command.py index cc345f1c4..eeacbb3d5 100644 --- a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command.py +++ b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command.py @@ -77,7 +77,10 @@ def __init__(self, cmd_id, seq, text, is_json=False): as_dict["pydevd_cmd_id"] = cmd_id as_dict["seq"] = seq self.as_dict = as_dict - text = json.dumps(as_dict) + try: + text = json.dumps(as_dict) + except TypeError: + text = json.dumps(as_dict, default=str) assert isinstance(text, str)