microsoft / microsoft/vscode-cpptools

Disable pretty-printer while populating Locals UI?

Aperta
#9,926 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

debugger Feature Request
Lingua principale
TypeScript
Stelle
6.2k
Fork
1.7k
Merge medio
14h 46m
PR unite (30g)
61

Descrizione

Environment
  • OS and version: Linux - Ubuntu 20.04
  • VS Code: 1.71.2
  • C/C++ extension: 1.12.4
  • OS and version of remote machine (if applicable): Local debug
  • GDB / LLDB version: GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2
Bug Summary and Steps to Reproduce

Bug Summary:

In my .gdbinit, I have a gdb pretty-printer function defined. In launch.json, pretty printing is enabled:

# (In Python mode)
gdb.pretty_printers.append(find_pp)
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },

This is fine because I see pretty prints if I dump variables via the gdb console within vscode. However, pretty printing also affects the Variables/Locals display, and this prevents me from expanding the relevant class/struct values to show the individual internal fields.

Request: vscode always disable pretty printing while it is retrieving the values to display in the Variables/Locals display, so that I can always expand values to see the actual member fields. Essentially, leave pretty printing for console commands only.

That request may make pretty printing less useful; some people may like seeing the pretty printed values in the Variables/Locals display. So perhaps:

Alternative request: vscode display the pretty printed values by default, just like it does today if pretty printing is enabled, but when the arrow that allows expanding/collapsing member fields is clicked, then temporarily disable pretty printing just while retrieving the member fields.

Debugger Configurations
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "binary_name config_name",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/_out-dev-ctr-usr-local/bin/binary_name",
            "args": [
                "a bunch of args"
            ],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}/product_name/${input:app_dir}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description": "Enable xxx's debug commands",
                    "text": "source ${workspaceFolder}/xxx/.gdbinit" 
                },
                {
                    "description": "Set local variables; required so Jinja can process UTF-8 chars in templates.",
                    "text": "set environment LC_CTYPE C.UTF-8" 
                }
            ],
            "miDebuggerPath": "${workspaceFolder}/product_name/vscode/mi_debugger.sh"
        }
    ],
    "inputs": [
        // This requires extension spadin.memento-inputs
        // You must manually type the sub-dir name, but it remembers it next time
        {
            "id": "app_dir",
            "type": "command",
            "description": "The product_name sub-directory",
            "command": "memento.promptString",
            "args": {
                "id": "app_dir",
                "description": "The product_name sub-directory",
                "default": "some/dir",
                "placeholder": "product_name sub-dir name e.g. some/dir"
            }
        }
    ]
}
Debugger Logs
NA
Other Extensions

No response

Additional Information

No response

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Nell’issue non sono identificati file sorgente, test o punti di ingresso. Inizia riproducendo il comportamento con GDB pretty-printing abilitato e confronta l’output della console con la vista Variables/Locals; il lavoro è completato quando il comportamento concordato consente agli utenti di ispezionare i campi membro preservando la visualizzazione pretty-printed prevista.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
typescript
Ambito
devtools
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.