Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 99601

How to start debug in Visual Studio Code on macOs in C language?

$
0
0

I have a simple project just with one main.c file and info.h file. I am using makefile for building purpose

myprog1 : main.o
    gcc -g main.o -Wall -ansi -pedantic -o myprog1
main.o : main.c info.h
    gcc -c main.c -Wall -ansi -pedantic -o main.o

I am clicking Debug -> Start debugging -> C++ (GDB/LLDB), then I get generated file (I edited my prog name added -g flag and stopAtEntry = true)

{
    // 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": "(lldb) Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/myprog1",
            "args": [
               "-g"
            ],
            "stopAtEntry": true,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "lldb"
        }
    ]
}

And when I click Run Debug it just ignores my debug points with message

module containing this breakpoint has not yet loaded or the breakpoint address could not be obtained

I have already read a lot of possible issues, but any help me...

What am I doing wrong?


Viewing all articles
Browse latest Browse all 99601

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>