Depurar prompt
Traducción Beta No Oficial
Esta página fue traducida por PageTurner AI (beta). No está respaldada oficialmente por el proyecto. ¿Encontraste un error? Reportar problema →
información
Por el momento, esta función solo funciona en powershell.
El prompt de depuración se muestra cuando depuras un script desde la línea de comandos o Visual Studio Code.
El valor predeterminado es [DBG]: .
Puedes utilizar plantillas text/template de Go templates enriquecidas con sprig para personalizar el texto.
Las variables de entorno están disponibles, al igual que en la funcionalidad de console_title_template.
Configuración
Debes extender o crear un tema personalizado con tu override para el prompt de depuración. Por ejemplo:
- json
- yaml
- toml
{
"debug_prompt": {
"background": "transparent",
"foreground": "#ffffff",
"template": "Debugging "
}
}
debug_prompt:
background: transparent
foreground: "#ffffff"
template: "Debugging "
[debug_prompt]
background = "transparent"
foreground = "#ffffff"
template = "Debugging "
Opciones
| Name | Type | Description |
|---|---|---|
foreground | string | color |
foreground_templates | string | color templates |
background | string | color |
background_templates | string | color templates |
template | string | a go text/template template extended with sprig utilizing the properties below - defaults to [DBG]: |
Plantilla (info)
| Name | Type | Description |
|---|---|---|
.Root | boolean | is the current user root/admin or not |
.PWD | string | the current working directory |
.Folder | string | the current working folder |
.Shell | string | the current shell name |
.UserName | string | the current user name |
.HostName | string | the host name |
.Code | int | the last exit code |
.Env.VarName | string | Any environment variable where VarName is the environment variable name |