Direct naar hoofdinhoud

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:

{
"debug_prompt": {
"background": "transparent",
"foreground": "#ffffff",
"template": "Debugging "
}
}

Opties

NameTypeDescription
foregroundstringcolor
foreground_templatesstringcolor templates
backgroundstringcolor
background_templatesstringcolor templates
templatestringa go text/template template extended with sprig utilizing the properties below - defaults to [DBG]:

Template (informatie)

NameTypeDescription
.Rootbooleanis the current user root/admin or not
.PWDstringthe current working directory
.Folderstringthe current working folder
.Shellstringthe current shell name
.UserNamestringthe current user name
.HostNamestringthe host name
.Codeintthe last exit code
.Env.VarNamestringAny environment variable where VarName is the environment variable name