EllanJiang/GameFramework · error · GameFrameworkException
Debugger window has been registered, can not create…
Error message
Debugger window has been registered, can not create debugger window group.
What it means
When registering 'Group/Sub/Window', the group prefix 'Group/Sub' must either be free or already be a DebuggerWindowGroup. This error is thrown when the prefix path exists but is a plain debugger window, so a group cannot be created there. The path hierarchy is therefore inconsistent with the new registration.
Solutions
- Plan the path hierarchy first: register "Tools/MyWin/Child" instead of reusing "Tools/MyWin" as both a window and a group.
- Unregister the conflicting leaf window before registering the deeper path.
- Use distinct group names and leaf names so no path is a prefix of another.
Example fix
// before
debugger.RegisterDebuggerWindow("Tools/Info", new InfoWindow());
debugger.RegisterDebuggerWindow("Tools/Info/Detail", new DetailWindow()); // conflicts
// after
debugger.RegisterDebuggerWindow("Tools/Info/Main", new InfoWindow());
debugger.RegisterDebuggerWindow("Tools/Info/Detail", new DetailWindow()); Defensive patterns
Strategy: validation
Validate before calling
// before registering "G/S/W", ensure no leaf window occupies "G/S"
if (debugger.HasDebuggerWindow(groupPath) && !(debugger.GetDebuggerWindow(groupPath) is DebuggerWindowGroup))
debugger.UnregisterDebuggerWindow(groupPath); Type guard
static bool IsGroup(IDebuggerWindow w) => w is DebuggerWindowGroup;
Try / catch
try { debugger.RegisterDebuggerWindow(path, window); }
catch (GameFrameworkException) { Log.Error($"Path '{path}' hierarchy conflicts with an existing window"); } Prevention
- Design the debugger path tree up front; never use one path as both a window and a group
- Keep group prefixes and leaf names disjoint
- Check what occupies a parent path before registering deeper paths
When it happens
Trigger: Registering a window at path "Tools/MyWin" first, then later "Tools/MyWin/Child" — the leaf 'Tools/MyWin' cannot become a group; registering paths where one is a prefix of the other but the shorter one was taken by a window.
Common situations: Incrementally adding nested debugger windows without planning the path tree; renaming a window into what is now a parent path of an existing window.
Understand the failure class
Background: "already exists" / EEXIST / FileAlreadyExistsException: what the 'file already exists' error means and how to fix it — this error's family across 37 libraries.
Related errors
- Path is invalid.
- Debugger window has been registered.
- Path is invalid.
- Debugger window is invalid.
- Can not add child entity which is already exist.
AI-assisted analysis of EllanJiang/GameFramework@d0c010b051 (2026-09-15).
Data as JSON: /api/errors/008ba64859b3d879.
Report an issue: GitHub.
Appendix: source
Thrown at GameFramework/Debugger/DebuggerManager.DebuggerWindowGroup.cs:234
{
if (InternalGetDebuggerWindow(path) != null)
{
throw new GameFrameworkException("Debugger window has been registered.");
}
m_DebuggerWindows.Add(new KeyValuePair<string, IDebuggerWindow>(path, debuggerWindow));
RefreshDebuggerWindowNames();
}
else
{
string debuggerWindowGroupName = path.Substring(0, pos);
string leftPath = path.Substring(pos + 1);
DebuggerWindowGroup debuggerWindowGroup = (DebuggerWindowGroup)InternalGetDebuggerWindow(debuggerWindowGroupName);
if (debuggerWindowGroup == null)
{
if (InternalGetDebuggerWindow(debuggerWindowGroupName) != null)
{
throw new GameFrameworkException("Debugger window has been registered, can not create debugger window group.");
}
debuggerWindowGroup = new DebuggerWindowGroup();
m_DebuggerWindows.Add(new KeyValuePair<string, IDebuggerWindow>(debuggerWindowGroupName, debuggerWindowGroup));
RefreshDebuggerWindowNames();
}
debuggerWindowGroup.RegisterDebuggerWindow(leftPath, debuggerWindow);
}
}
/// <summary>
/// 解除注册调试器窗口。
/// </summary>
/// <param name="path">调试器窗口路径。</param>
/// <returns>是否解除注册调试器窗口成功。</returns>
public bool UnregisterDebuggerWindow(string path)
{View on GitHub (pinned to d0c010b051)