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?
P.S. I am new in C language and in VS code. Could you please advise me what exactly I have to change in order to make it work?
EDIT
I also tried to launch debug on my macOS and there is a main()
method
As you can see I put two debug points, but anyway when I start to debug, it doesn't stop at any of these two points.
You can see log output on the screenshot...
What is the problem?