I have looked for documentation on this and found nothing. I have MinGW installed and it works great. I just don't know how to use the debugger.
Given some simple code, say in a file called "mycode.cpp":
int main()
{
int temp = 0;
for (int i = 0; i < 5; ++i)
temp += i;
return 0;
}
...how would I debug this. What are the commands that I use to debug code with MinGW and GDB in windows? Can I step through the code via the command line like in Visual Studio? If so what commands do I use to do that?
Are there any tutorials for using GDB out there? I couldn't find any, but if anyone could direct me to one that would be great too. I'm tired of writing tons of std::cout
statements to debug complex code.
run
,continue
,next
,list
andhelp
. When all else fails, try usinghelp
. – Schaefer