diff --git a/src/debugpy/common/util.py b/src/debugpy/common/util.py index 603918e8..3b63e4a0 100644 --- a/src/debugpy/common/util.py +++ b/src/debugpy/common/util.py @@ -2,13 +2,13 @@ # Licensed under the MIT License. See LICENSE in the project root # for license information. -from functools import partial import inspect -import itertools import os import sys from types import CodeType +from debugpy.server import new_dap_id + def evaluate(code, path=__file__, mode="eval"): # Setting file path here to avoid breaking here if users have set @@ -173,7 +173,7 @@ class IDMap(object): def __init__(self): self._value_to_key = {} self._key_to_value = {} - self._next_id = partial(next, itertools.count(0)) + self._next_id = new_dap_id def obtain_value(self, key): return self._key_to_value[key]