Which one do you recommend for beginners to start with and why?
I am taking another crack at learning to code in C. (I've been successful using VB6 in the past.) From my initial studies, segment faults, syntax errors, and difficulties understanding pointers are the early challenges. I'd like to focus on learning the language and spend less time learning the IDE and debugger.
VS is a great IDE, but it isn't compatible with other compilers. Code::Blocks with MinGW installes automatically and you might easily use it with any other properly installed compilers, but it lacks many VS features. You can also use NetBeans or Eclipse as an IDE, but I never use them, so I cannot say for sure.
So at this point, I have downloaded all 3: Pelles C, Codeblocks, and VS C++ 2010 express. I have been sucessful writing simple programs in C using Pelles and Codeblocks. It wasn't clear to me how to do the same in VS (it seems less obvious how to write a console app in VS). I haven't tried Dev C++ yet.
At the moment, I am debugging by using lots of printf statements while the program executes to monitor what's happening. I'd prefer to learn how to use the debuggers but it doesn't seem obvious how to use the debuggers so I'm looking for help. I've looked for help files and online tutorials but haven't found any yet. Any guidance would be appreciated.
Ultimately, I want to be able to explore coding in C with an easy to use IDE and debugger. I'd like to watch variables, look at blocks of memory, and single step programs.
Maybe I am blind but I can't see how to run the debuggers for Pelles or Codeblocks.
Yes, I can see the Debug screen, but I don't know what to do next.
I have a project loaded (a simple console app written in C), and now I want to "watch" some variables while I single step the program. How do I do that?
I admit that I am probably missing something very obvious.
As you suggested, I looked at the Wiki and discovered I needed to set the -g compiler switch (produce debugging symbols). I also discovered that I needed to type in the variable name that I wanted to "watch" in the watch window. And lastly, after playing around a little, I figured out that to set a breakpoint, I needed to click just to the right of the line number in the source code. Running the program in debug mode until the breakpoint showed me the value of my "watch" variables.
So at least now I am starting to use the debugger. Thanks again for your help.