microsoft / microsoft/vscode-cpptools

Option(s) to suppress notifications when source files cannot be found in the debugger

Aperta
#2,762 5 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

Type: Debugger

Describe the bug

  • OS and Version: Ubuntu 16.04.05 LTS
  • VS Code Version: 1.28.2 (7f3ce96ff4729c91352ae6def877e59c561f4850)
  • C/C++ Extension Version: 0.20.1
  • Other extensions you installed (and if the issue persists after disabling them):

When debugging, a notification always pops up when a source file cannot be found, for example:

  • Unable to open 'raise.c': File not found (file:///build/glibc-Cl5G7W/glibc-2.23/sysdeps/unix/sysv/linux/raise.c).
  • Unable to open 'abort.c': File not found (file:///build/glibc-Cl5G7W/glibc-2.23/stdlib/abort.c).

This happens when an uncaught exception occurred, for example. In itself it's not an impeding issue (everything works), but it is annoying nonetheless - I have to forcefully click the × button each time to close the notification window when this happens.

I could install the libc sources but that's a rather crude solution in my opinion :)

I'd prefer if there is some way to improve on this, such as:

  • Provide an option to suppress the notification when files could not be found
  • A timed popup (so it pops up and only stays there for 2 seconds)
  • A less intrusive way of a notification

I am not sure if this repository is the right place to request this feature (maybe it's written in the VSCode core) but here goes anyway.

To Reproduce

Code sample:

#include <exception>
int main() {
    throw std::exception();
}

launch.json:

{
	"version": "0.2.0",
	"configurations": [
		{
			"name": "(gdb) Launch",
			"type": "cppdbg",
			"request": "launch",
			"program": "${workspaceFolder}/main",
			"args": [],
			"stopAtEntry": false,
			"cwd": "${workspaceFolder}",
			"environment": [],
			"externalConsole": false,
			"MIMode": "gdb",
			"setupCommands": [
				{
					"description": "Enable pretty-printing for gdb",
					"text": "-enable-pretty-printing",
					"ignoreFailures": true
				}
			]
		}
	]
}

When launching, the debugger will kick in ("PAUSED ON EXCEPTION"). A popup immediately shows up that it's unable to open 'raise.c'.

Additional context
The issue is somewhat relevant to this issue (for a different extension): https://github.com/vadimcn/vscode-lldb/issues/146

In any case, thanks so far for the wonderful extension.

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 notifica con l’esempio C++ e launch.json forniti nella VS Code C/C++ extension. Determina se la notifica viene emessa dall’estensione o dal core di VS Code, quindi individua il punto di ingresso appropriato e i test esistenti. Il lavoro è completo quando esiste un modo concordato e testato per sopprimere o ridurre queste notifiche relative a sorgenti mancanti.

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

Valutazione

Stack tecnologico
cpp, typescript, vscode
Ambito
devtools
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.