From bb54ed75f7c0c047ac59b71317872908dc175bf9 Mon Sep 17 00:00:00 2001 From: Griatch Date: Sun, 25 May 2025 11:09:51 +0200 Subject: [PATCH] Cleaned up the debugpy contrib metadata a little more --- CHANGELOG.md | 2 ++ evennia/contrib/utils/debugpy/README.md | 9 +++++---- evennia/contrib/utils/debugpy/__init__.py | 6 ++++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a5c27cc12..5f50bd0ca6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ This upgrade requires running `evennia migrate` on your existing database - [Feat][pull3756]: Updated German translation (JohnFi) - [Feat][pull3757]: Add more i18n strings to `DefaultObject` for easier translation (JohnFi) - [Feat][pull3783]: Support users of `ruff` linter by adding compatible config in `pyproject.toml` (jaborsh) +- [Feat][pull3777]: New contrib `debugpy` for debugging Evennia with in VSCode with `debugpy` adapter (electroglyph) - [Fix][pull3677]: Make sure that `DefaultAccount.create` normalizes to empty strings instead of `None` if no name is provided, also enforce string type (InspectorCaracal) - [Fix][pull3682]: Allow in-game help searching for commands natively starting @@ -88,6 +89,7 @@ This upgrade requires running `evennia migrate` on your existing database [pull3757]: https://github.com/evennia/evennia/pull/3757 [pull3768]: https://github.com/evennia/evennia/pull/3768 [pull3783]: https://github.com/evennia/evennia/pull/3783 +[pull3777]: https://github.com/evennia/evennia/pull/3777 [issue3688]: https://github.com/evennia/evennia/issues/3688 [issue3687]: https://github.com/evennia/evennia/issues/3687 [issue3788]: https://github.com/evennia/evennia/issues/3788 diff --git a/evennia/contrib/utils/debugpy/README.md b/evennia/contrib/utils/debugpy/README.md index 5538defa83..11fd2adb45 100644 --- a/evennia/contrib/utils/debugpy/README.md +++ b/evennia/contrib/utils/debugpy/README.md @@ -1,4 +1,4 @@ -# debugpy +# DebugPy VSCode debugger integration Contribution by electroglyph, 2025 @@ -24,12 +24,13 @@ From the venv where you installed Evennia run: In your Evennia mygame folder, open up `/commands/default_cmdsets.py` -add `from evennia.contrib.utils.debugpy.cmd import CmdDebugPy` somewhere near the top. +add `from evennia.contrib.utils.debugpy import CmdDebugPy` somewhere near the top. -in CharacterCmdSet.at_cmdset_creation add this under `super().at_cmdset_creation()`: +in `CharacterCmdSet.at_cmdset_creation` add this under `super().at_cmdset_creation()`: `self.add(CmdDebugPy)` + ### Add "remote attach" option to VS Code debugger Start VS Code and open your launch.json like this: @@ -111,4 +112,4 @@ Back in VS Code attach the debugger: Back in Evennia you should see "Debugger attached." -Now trigger the breakpoint you set and you'll be using a nice graphical debugger. \ No newline at end of file +Now trigger the breakpoint you set and you'll be using a nice graphical debugger. diff --git a/evennia/contrib/utils/debugpy/__init__.py b/evennia/contrib/utils/debugpy/__init__.py index e69de29bb2..20d4eedf19 100644 --- a/evennia/contrib/utils/debugpy/__init__.py +++ b/evennia/contrib/utils/debugpy/__init__.py @@ -0,0 +1,6 @@ +""" +VSCode Evennia debugger adapter - electroglyph, 2025 + +""" + +from .cmd import CmdDebugPy # noqa