Add logging to symbol resolution#23
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds comprehensive diagnostic logging capabilities to help debug symbol resolution issues that are difficult to reproduce locally. The logging is controlled by the PROFILE_EXPLORER_DEBUG environment variable and writes detailed information to a temporary file that users can easily access and share.
Key changes:
- Introduces a new
DiagnosticLoggerutility class with environment variable-controlled logging - Adds detailed logging throughout the symbol resolution pipeline
- Provides UI integration for accessing diagnostic logs
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| DiagnosticLogger.cs | New diagnostic logging utility with file-based logging and UI integration methods |
| ProfileModuleBuilder.cs | Adds logging for module initialization, debug info loading, and function resolution |
| PDBDebugInfoProvider.cs | Adds logging for PDB symbol searches and function lookups |
| SectionPanel.xaml.cs | Adds logging for module status tracking in the UI |
| McpActionExecutor.cs | Adds logging for binary info processing |
| MainWindow.xaml.cs | Adds event handler for diagnostic log menu |
| MainWindow.xaml | Adds diagnostic log menu item to the UI |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| /// </summary> | ||
| public static string[] GetRecentMessages() { | ||
| if (!IsEnabled) { | ||
| return new string[0]; |
There was a problem hiding this comment.
Use Array.Empty<string>() instead of new string[0] for better performance and consistency with modern C# conventions.
| return new string[0]; | |
| return Array.Empty<string>(); |
| Trace.WriteLine($">> TraceEvent FindSymbolFilePath for {symbolFile.FileName}"); | ||
| Trace.IndentLevel = 1; | ||
| Trace.WriteLine(logWriter.ToString()); | ||
| Trace.WriteLine(searchLog); |
There was a problem hiding this comment.
The variable searchLog is used here but was previously logWriter.ToString(). Consider using the same approach throughout the method for consistency.
No description provided.