Skip to content

Add logging to symbol resolution#23

Merged
bgn64 merged 1 commit into
mainfrom
benjaming/add-logging
Sep 26, 2025
Merged

Add logging to symbol resolution#23
bgn64 merged 1 commit into
mainfrom
benjaming/add-logging

Conversation

@bgn64

@bgn64 bgn64 commented Sep 26, 2025

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings September 26, 2025 00:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 DiagnosticLogger utility 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];

Copilot AI Sep 26, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use Array.Empty<string>() instead of new string[0] for better performance and consistency with modern C# conventions.

Suggested change
return new string[0];
return Array.Empty<string>();

Copilot uses AI. Check for mistakes.
Trace.WriteLine($">> TraceEvent FindSymbolFilePath for {symbolFile.FileName}");
Trace.IndentLevel = 1;
Trace.WriteLine(logWriter.ToString());
Trace.WriteLine(searchLog);

Copilot AI Sep 26, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable searchLog is used here but was previously logWriter.ToString(). Consider using the same approach throughout the method for consistency.

Copilot uses AI. Check for mistakes.
@bgn64 bgn64 merged commit 4973289 into main Sep 26, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants