microsoft / microsoft/vscode-cpptools

Unable to paste multiple lines to integrated terminal while debugging C++

Aperta
#12,191 6 commenti 3 reazioni 1 assegnatario Vedi su GitHub

@browntarik ci sta già lavorando.

Dal 12/4/2024.

debugger help wanted Language Service more info needed
Lingua principale
TypeScript
Stelle
6.2k
Fork
1.7k
Merge medio
14h 46m
PR unite (30g)
61

Descrizione

Environment
  • OS and version: Windows11 23H2
  • VS Code:1.88.0
  • C/C++ extension:1.19.9
  • GDB / LLDB version:13.2
Bug Summary and Steps to Reproduce

Steps to Reproduce:

#include
using namespace std;

int main() {
char x;
cin >> x;
cout << "hello";
cout << "world";
cin >> x;
return 0;
}
If you add a breakpoint on the line cout << "hello" ;, step over does not work after pasting multiple lines to the terminal.

recording

Debugger Configurations
{
    "tasks": [
        {
            "type": "cppbuild",
            "label": "C/C++: g++.exe build active file",
            "command": "D:\\application_code\\msys64\\mingw64\\bin\\g++.exe",
            "args": [
                "-fdiagnostics-color=always",
                "-g",
                "${file}",
                "-o",
                "${fileDirname}\\${fileBasenameNoExtension}.exe"
            ],
            "options": {
                "cwd": "${fileDirname}"
            },
            "problemMatcher": [
                "$gcc"
            ],
            "group": "build",
            "detail": "Task generated by Debugger."
        },
    ],
    "version": "2.0.0"
}

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": " g++.exe ",
            "type": "cppdbg",
            "request": "launch",
            "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
            "stopAtEntry": false,
            "cwd": "${fileDirname}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "miDebuggerPath": "d:\\application_code\\msys64\\mingw64\\bin\\gdb.exe",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],
            "preLaunchTask": "C/C++: g++.exe build active file",
            
        },
    ]
}
Debugger Logs
1: (7091) <-1031-exec-next 
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (7092) ->1031^running\r\n"},"seq":777}
1: (7092) ->1031^running
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (7092) ->*running,thread-id=\"all\"\r\n"},"seq":779}
1: (7092) ->*running,thread-id="all"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (7092) ->(gdb)\r\n"},"seq":781}
1: (7092) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (7093) 1031: elapsed time 1\r\n"},"seq":783}
1: (7093) 1031: elapsed time 1
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (7093) ->&\"\\n\"\r\n"},"seq":785}
1: (7093) ->&"\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (7093) ->^done\r\n"},"seq":787}
1: (7093) ->^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (7093) ->(gdb)\r\n"},"seq":789}
1: (7093) ->(gdb)
--> R (next-17): {"type":"response","request_seq":17,"success":true,"command":"next","body":{},"seq":791}
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.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.