Skip to content

Commit

Permalink
make wrapped arrays resolve properly under debug
Browse files Browse the repository at this point in the history
  • Loading branch information
apple1417 committed Jan 5, 2024
1 parent c72b6f8 commit 5a5f5a3
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,23 @@
("localhost", 5678),
in_process_debug_adapter=True,
)
except ImportError:

# Make WrappedArrays resolve the same as lists
from _pydevd_bundle.pydevd_resolver import ( # pyright: ignore[reportMissingImports]
tupleResolver, # pyright: ignore[reportUnknownVariableType]
)
from _pydevd_bundle.pydevd_xml import ( # pyright: ignore[reportMissingImports]
_TYPE_RESOLVE_HANDLER, # pyright: ignore[reportUnknownVariableType]
)
from unrealsdk.unreal import WrappedArray

if not _TYPE_RESOLVE_HANDLER._initialized: # pyright: ignore[reportUnknownMemberType]
_TYPE_RESOLVE_HANDLER._initialize() # pyright: ignore[reportUnknownMemberType]
_TYPE_RESOLVE_HANDLER._default_type_map.append( # pyright: ignore[reportUnknownMemberType]
(WrappedArray, tupleResolver),
)

except (ImportError, AttributeError):
pass

_full_traceback = False
Expand Down

0 comments on commit 5a5f5a3

Please sign in to comment.