Skip to content

Prevent debuggers from stepping into Pathy code#88

Merged
dennisdoomen merged 1 commit intomainfrom
make-code-nondebuggable
Oct 19, 2025
Merged

Prevent debuggers from stepping into Pathy code#88
dennisdoomen merged 1 commit intomainfrom
make-code-nondebuggable

Conversation

@dennisdoomen
Copy link
Owner

@dennisdoomen dennisdoomen commented Oct 19, 2025

Adds the [DebuggerNonUserCode] attribute to several classes in the Pathy library to improve the debugging experience. The attribute prevents debuggers from stepping into these classes when developers are debugging their own code, treating them as framework/library code that users typically don't want to debug through. This is particularly useful since Pathy appears to be a path manipulation utility library that gets embedded into other projects, and developers using it would prefer to step over its internal implementation details rather than into them during debugging sessions. The change affects the main path handling classes and extension methods, making debugging more focused on user code rather than the library's internals.

Fixes #85

@dennisdoomen dennisdoomen added the enhancement New feature or request label Oct 19, 2025
@dennisdoomen dennisdoomen requested a review from Copilot October 19, 2025 07:33
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds DebuggerNonUserCode to internal Pathy types when compiled without PATHY_PUBLIC to reduce debugger stepping into library internals.

  • Marked internal versions of core types and extension classes with DebuggerNonUserCode
  • Left public versions (when PATHY_PUBLIC is defined) unchanged

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
Pathy/ChainablePathExtensions.cs Adds DebuggerNonUserCode to the internal extension class under non-PATHY_PUBLIC builds
Pathy/ChainablePath.cs Adds DebuggerNonUserCode to the internal ChainablePath record and internal StringExtensions class under non-PATHY_PUBLIC builds
Pathy.Globbing/PathyGlobbing.cs Adds DebuggerNonUserCode to the internal globbing extension class under non-PATHY_PUBLIC builds

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions
Copy link

Test Results

110 tests  ±0   110 ✅ ±0   0s ⏱️ -1s
  3 suites ±0     0 💤 ±0 
  3 files   ±0     0 ❌ ±0 

Results for commit 078e9a5. ± Comparison against base commit 7d3fe74.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 18627285007

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 97.006%

Totals Coverage Status
Change from base Build 18627276778: 0.0%
Covered Lines: 230
Relevant Lines: 238

💛 - Coveralls

@dennisdoomen dennisdoomen merged commit 7418cc8 into main Oct 19, 2025
3 checks passed
@dennisdoomen dennisdoomen deleted the make-code-nondebuggable branch October 19, 2025 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mark the Pathy code as non-debuggable

2 participants