Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Hide automatic / command variables

Abierto
#5,405 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
38/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
powershell, typescript, vscode

Línea de trabajo

Reproduce el problema iniciando cualquier script y deteniéndose en la primera línea; después, inspeccione la lista de variables de depuración que se muestra en el informe. Rastree cómo la extensión de PowerShell rellena esa lista y determine cómo deben filtrarse las variables automáticas, de script y de proceso, conservando al mismo tiempo las variables referenciadas explícitamente. Se considera terminado cuando una sesión de depuración grande muestra las variables de usuario relevantes sin las variables automáticas no deseadas.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Area-Debugging Issue-Bug Needs: Maintainer Attention
Prerequisites
  • I have written a descriptive issue title.
  • I have searched all open and closed issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • If this is a security issue, I have read the security issue reporting guidance.
Summary

While using the Powershell extension when debugging larger scripts i am finding that having to scroll through all the automatic / script / process variables to find the specific one i am after is becoming difficult when i have a larger number of script variables.
Is there a way of hiding all of the automatic variables ($_, $Preference, $errors etc) unless they are explicitly referenced in the script?
I have searched to see if it is something other have described but not found a way.

PowerShell Version
Name                           Value
----                           -----
PSVersion                      7.5.4
PSEdition                      Core
GitCommitId                    7.5.4
OS                             Microsoft Windows 10.0.26200
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Name             : Visual Studio Code Host
Version          : 2025.4.0
InstanceId       : 651c3667-fd86-4ed8-b8d6-7768a49de82f
UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture   : en-GB
CurrentUICulture : en-GB
PrivateData      : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled  : True
IsRunspacePushed : False
Runspace         : System.Management.Automation.Runspaces.LocalRunspace
Visual Studio Code Version
1.109.5
072586267e68ece9a47aa43f8c108e0dcbf44622
x64
Extension Version
[email protected]
Steps to Reproduce

Launch any script and break on the very first line.
Your debug variables list will look something like this:

Image The only variable i have defined in my script at this point is $Day but all the other automatic variables are getting in the way.
Visuals

No response

Logs

No response

Lenguaje dominante
TypeScript
Estrellas
1.9k
Forks
549
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de PowerShell/vscode-powershell

Todos los issues de PowerShell/vscode-powershell

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.