Vscode-cpptools: Debugging Error:Unable to open 'raise.c'

Created on 1 Dec 2019  路  1Comment  路  Source: microsoft/vscode-cpptools

  • OS and Version: Ubuntu 18.4
  • VS Code Version: Vscode 1.4
  • C/C++ Extension Version:0.26

Hello, I have read all the articles about "raise.c" and none of them solved my problem, I just wrote a simple OpenCV code which captures webcam's frames. each time I run my code it frequently shows an error. the error message is:

Unable to open 'raise.c': Unable to read file (Error: File not found (/build/glibc-OTsEL5/glibc-2.27/sysdeps/unix/sysv/linux/raise.c)).
launch.json is:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "g++ build and debug active file",
            "type": "cppdbg",
            "request": "launch",
            "program": "${fileDirname}/${fileBasenameNoExtension}",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],
            "preLaunchTask": "g++ build active file",
            "miDebuggerPath": "/usr/bin/gdb"
        }
    ]
}

and tasks.json is:

{
    "tasks": [
        {
            "type": "shell",
            "label": "g++ build active file",
            "command": "/usr/bin/g++",
            "args": [
                "-g",
                "${file}",
                "-o",
                "${fileDirname}/${fileBasenameNoExtension}",
                "`pkg-config",
                 "--libs",
                  "--cflags", 
                  "opencv4`"

            ],
            "options": {
                "cwd": "/usr/bin"
            }
        }
    ],
    "version": "2.0.0"
}

So How can I solve this problem? is there any way to solve it. I am a beginner programmer .any ideas are welcome. thanks.

by design debugger

>All comments

The debugger is stopping inside a library function that exists in the file raise.c. This is not your code so it gives you the error because it can't find the file. You can ignore that and change the stack frame you want to look at in the Stacks debug pane.

Was this page helpful?
0 / 5 - 0 ratings