Fix debug tracing error with magic extents by jborean93 · Pull Request #25726 · PowerShell/PowerShell

@jborean93

Fixes the error when PowerShell attempts to print the debug trace line
for functions generated with an invalid extent. For example PowerShell
creates an extent with a column and line of 0 for things like the
default class constructors. This is an issue as the trace debug line
always subtracts by 1 to make the value start at 0 rather than 1.

It also adds the DebuggerHidden attribute to the class default
constructor to avoid confusing end users from seeing a trace line for
something they did not write.

This was referenced

Jul 4, 2025

@jborean93

iSazonov

@iSazonov iSazonov added the CL-General

Indicates that a PR should be marked as a general cmdlet change in the Change Log

label

Jul 4, 2025

SeeminglyScience

@jborean93 @SeeminglyScience

Co-authored-by: Patrick Meinecke <SeeminglyScience@users.noreply.github.com>

SeeminglyScience

cmarciano91

Amro1984 pushed a commit to Amro1984/PowerShell that referenced this pull request

Aug 12, 2025
Co-authored-by: Patrick Meinecke <SeeminglyScience@users.noreply.github.com>

SIRMARGIN pushed a commit to SIRMARGIN/PowerShell that referenced this pull request

Dec 12, 2025
Co-authored-by: Patrick Meinecke <SeeminglyScience@users.noreply.github.com>