Skip to content

bug(plugin-host): plugin diagnostic messages go to VS debug output, not App Output panel #190

@abbaye

Description

@abbaye

Description

In PluginListItemViewModel.cs (line 435), a TODO comment reads:

// TODO: Put the Debug in the output panel of App instead of the VS debug output, which is invisible to most users and causes crashes when no debugger is attached.

Plugin lifecycle messages (load errors, exceptions, activation failures) are currently written with Debug.WriteLine(). When running without a debugger attached, Debug.WriteLine is a no-op and the messages are completely invisible. In the worst case, a Debug.Assert failure crashes the process silently.

Impact

  • Users running the standalone IDE (no VS attached) see no diagnostic output when a plugin fails to load
  • Plugin developers get no feedback from the Output panel during development

Fix path

  1. Replace Debug.WriteLine(...) calls in PluginListItemViewModel with IOutputService.Warning(...) / .Error(...)
  2. The IOutputService is already available via IIDEHostContext.OutputService — inject it or resolve via the host context already available in PluginListItemViewModel
  3. Add a severity-aware format: [PluginHost] PluginName: message

Affected file

Sources/WpfHexEditor.PluginHost/UI/PluginListItemViewModel.cs — around line 435

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions