Assert Night
Assert Night

Reputation: 1

How to fix 'File not found' error in debugging with VScode debugger gcc

While I was debugging a c code, my Vscode debugger for gcc showed a error like this: 'Unable to open 'test.c': Unable to read file(Error:File not found(C:\mycode\C:\mycode\test.c))'. So why my file path exists a repetition? And how to fix it?

I had only installed these plugins: C/C++ C++ Intellisense

Upvotes: 0

Views: 4665

Answers (1)

zeta
zeta

Reputation: 11

Change your tasks.json from "args":[ "${file} ] to ${relativeFile},and delete "cwd" or change it to ${workspaceFolder}.

Upvotes: 1

Related Questions