microsoft / microsoft/vscode-cpptools

[LLDB] lldb-mi debugger not able to take input file as an exe argument

Aperta
#1,219 20 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

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

Descrizione

Hi, I am trying to debug a program which takes a input file. It works in command line when I run it as ./a.out <testinput.txt and when I try to debug it I get the following output and debugger hangs as if it doesnot get any input.

Launching: '/Users/wge/Github/CSE340cpp/Pj3/a.out'
Working directory: '/Users/wge/Github/CSE340cpp/Pj3'
2 arguments:
argv[0] = '/Users/wge/Github/CSE340cpp/Pj3/a.out'
argv[1] = '<testa8t.txt'

I did try put < and testfile.txt in two arguments with no difference.
I set the external console to be true but it doesn't seem like there is a way for cpp debugger to accept a input like regular command line would?
I am using vscode 1.17 and lastest cpp extension with lldb on Mac OSX.

{
"version": "0.2.0",
"configurations": [
{
"name": "(lldb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/a.out",
"args": ["<testa8t.txt"],
"stopAtEntry": false,
"cwd": "${workspaceRoot}",
"environment": [],
"externalConsole": true,
"osx": {
"MIMode": "lldb"
}
}
]
}

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

Inizia riproducendo la configurazione launch.json segnalata su macOS con LLDB, concentrandoti sulle impostazioni args ed externalConsole. Conferma se il reindirizzamento di stdin dal file di input viene fornito al programma sottoposto a debug; il lavoro è completato quando il programma accetta l’input del file mentre viene avviato tramite il debugger C/C++.

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

Valutazione

Stack tecnologico
cpp, vscode
Ambito
devtools
Tipo di issue
Bug
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.