You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.
This is a quirk of pydevd - when reporting the value of the variable, it includes type as part of the value. E.g. given x = 123, the value is reported as int: 123. These are displayed as is in PyDev, but for VSC and especially VS (which has a separate type column), we don't want the type - it's redundant, and gets in the way of editing variable value.
It looks like the format is uniform, so we can just drop the part before the colon.
The text was updated successfully, but these errors were encountered:
Turns out that pydevd computes values via str, implicitly:
value='%s: %s'% (cName, v)
Hence why strings aren't quoted (but e.g. bytes are). This would present a problem for some other types as well, and would deviate from our existing behavior. What we really want is repr.
The good news is that pydevd provides a way to register a custom value representation provider (StrPresentationProvider). So we can just plug in our existing SafeRepr implementation directly.
This is a quirk of pydevd - when reporting the value of the variable, it includes type as part of the value. E.g. given
x = 123
, the value is reported asint: 123
. These are displayed as is in PyDev, but for VSC and especially VS (which has a separate type column), we don't want the type - it's redundant, and gets in the way of editing variable value.It looks like the format is uniform, so we can just drop the part before the colon.
The text was updated successfully, but these errors were encountered: