Fix debug tracing error with magic extents (#25726)

Co-authored-by: Patrick Meinecke <SeeminglyScience@users.noreply.github.com>
This commit is contained in:
Jordan Borean
2025-07-15 13:42:09 -04:00
committed by GitHub
co-authored by Patrick Meinecke
parent c6329ddd54
commit ce76ae1def
2 changed files with 21 additions and 1 deletions
@@ -15,5 +15,16 @@ Describe "Set-PSDebug" -Tags "CI" {
It "Should be able to set strict" {
{ Set-PSDebug -Strict } | Should -Not -Throw
}
It "Should skip magic extents created by pwsh" {
class ClassWithDefaultCtor {
MyMethod() { }
}
{
Set-PSDebug -Trace 1
[ClassWithDefaultCtor]::new()
} | Should -Not -Throw
}
}
}