Vscode-cpptools: Error on WSL: unable to open raise.c

Created on 26 Mar 2018  路  3Comments  路  Source: microsoft/vscode-cpptools

I am using latest windows 10 without any insider edition. Also are my visual code and cpp extenstion.

I have configure my launch.json as your suggestion https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/Debugger/gdb/Windows%20Subsystem%20for%20Linux.md

But still, i got a lot of errors like this :

[Switching to Thread 0x7fffd1d30700 (LWP 89)]
0x00007ffffcbb5428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54

when i am debugging my cpp projects.

And it seems that the extension can't find open raise.c: (file:///build/glibc-bfm8X4/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c).

by design debugger

Most helpful comment

I got this problem, when the file the program trying to open is not in the cwd. Moving the file to the cwd solved my problem.

All 3 comments

@SkyRiderMike That is gdb trying to find source but it can't find it on your machine when you are stopping in the glibc code. You can probably use the callstack window and go where you need to go to debug and ignore it. This is expected and unless you have glibc source, you won't be able get rid of it, but it should not affect your debugging.

@SkyRiderMike This is the expected behavior of the debugger, it is trying to stop at the file where an error occurred.

To ignore these errors, you can add the following to your launch.json

"setupCommands": [
   {
      "description": "Skip <path> files",
      "text": "-interpreter-exec console \"skip -gfi <path-to-ignore>/**/*\""
   }
]

To ignore the raise.c, you will need to add with /build/glibc-bfm8X4/glibc-2.23/

I got this problem, when the file the program trying to open is not in the cwd. Moving the file to the cwd solved my problem.

Was this page helpful?
0 / 5 - 0 ratings