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
- Replace
Debug.WriteLine(...) calls in PluginListItemViewModel with IOutputService.Warning(...) / .Error(...)
- The
IOutputService is already available via IIDEHostContext.OutputService — inject it or resolve via the host context already available in PluginListItemViewModel
- Add a severity-aware format:
[PluginHost] PluginName: message
Affected file
Sources/WpfHexEditor.PluginHost/UI/PluginListItemViewModel.cs — around line 435
Description
In
PluginListItemViewModel.cs(line 435), a TODO comment reads:Plugin lifecycle messages (load errors, exceptions, activation failures) are currently written with
Debug.WriteLine(). When running without a debugger attached,Debug.WriteLineis a no-op and the messages are completely invisible. In the worst case, aDebug.Assertfailure crashes the process silently.Impact
Fix path
Debug.WriteLine(...)calls inPluginListItemViewModelwithIOutputService.Warning(...)/.Error(...)IOutputServiceis already available viaIIDEHostContext.OutputService— inject it or resolve via the host context already available inPluginListItemViewModel[PluginHost] PluginName: messageAffected file
Sources/WpfHexEditor.PluginHost/UI/PluginListItemViewModel.cs— around line 435