Debugprompt
Onofficiële Beta-vertaling
Deze pagina is vertaald door PageTurner AI (beta). Niet officieel goedgekeurd door het project. Een fout gevonden? Probleem melden →
informatie
Deze functie werkt momenteel alleen in powershell.
De debugprompt wordt weergegeven wanneer je een script debugt vanaf de opdrachtregel of Visual Studio Code.
De standaardwaarde is [DBG]: .
Je kunt go text/template-sjablonen gebruiken, uitgebreid met sprig, om de tekst te verrijken.
Omgevingsvariabelen zijn beschikbaar, net als bij de console_title_template-functionaliteit.
Configuratie
Je moet een aangepast thema uitbreiden of maken met je debugprompt-override. Bijvoorbeeld:
- 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 "
Opties
| 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]: |
Template (informatie)
| 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 |