Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Who thinks VC++ IDE/debugger is not good?

Status
Not open for further replies.

jms137

Programmer
Oct 6, 2002
18
0
0
GB
Hello coders.

I am fairly new to VC++ from a Java background. My impressions of the VC++6 IDE are very poor.

1) The debugger is not good. It constantly fails to recognize the area where the problem is and displays incorrect debugging hints. I have had it display about 10 assorted errors for something as simple as a missing ".". The one in the jdk is far, far superior. It is very precise compared to this.

2) The way the error messages appear is hard to read. They should be formatted better.

3) I CONSTANTLY get "cannot save, this file is in use by another application" type messages for NO reason!. It is pathetic.


My main gripe is with he innacurracy of the debugger. Anyone who has used Borland JBUilder or the jdk will recognize this. I am considering getting Borland C Builder and trying to import the MFC classes.

I wondered what everyone else thought of the IDE, I am curious! Please let me know.

regards,

john
 
I get the "cannot save, this file is in use by another application" messages all the time too. This seems to happen more on some days than others.
I personally think the IDE is OK though I agree about the error messages. However, I do know that it's sometimes hard to get your head around working in different ways when you're so used to coding in a different language and environment. I got a copy of Visual J++ and found it hard to get used to the differences in the way things work in comparison to VC++ which I was so used.
It actually reached a point where I was thinking the same thing about J++ as your are about C++.
The moral of the story: as a Java coder, it's all probably a case of you need to get used to working in C++ before passing too many judgements. As for the file in use messages, perhaps this bug has been sorted out in the latest version of VC++??
tellis.gif

[sup]programmer (prog'ram'er), n A hot-headed, anorak wearing, pimple-faced computer geek.[/sup]​
 
qednick,

Yeah i know it's sometimes hard to move environments. But I recently moved from Java to doing ASP.NET in VisualStudio.NET using VB, and I had never done any of them before. I found VS.NET very good and easy to use, and VB.NET was the most ludicrously easy programming language to learn. (i still think JBuilder is better than VS.NET!).

My gripes aren't really about C++ as a language, I don't think I know it well enough yet to complain. My gripe is mainly about the program masquerading as a debugger. I mean it is really pathetic.. it's like something half developed... a Beta version!

In a perverse way it improves your coding, though, because with JBuilder I tended to just bang out code and rely on the debugger to catch the little slip ups. I know I cannot do this in vc++.. :)

john
 
I understand where you're coming from but I think the general consensus is, if you're knowledgable in C++ you should be able to figure out the debugger for yourself! When it comes to Microsoft stuff, I myself gripe about some of the documentation and example programs (or lack thereof) suppplied with VC++. In fact, some of it is ridiculously hard to understand and not clear at all. Many times, you have to use trial and error to work out how 'simple' functions work OR, worse still, a function which should be 'simple' is incredibly complex and requires ridiculously complex structures to be passed in as parameters.
Personally, I'm not the world's biggest Microsoft lover though I do get along with VC++. I think this is the only Microsoft product that I actually use voluntarily (except maybe OutlookExpress).
I moved into Windows programming after spending quite a few years programming Macs with CodeWarrior/PowerPlant. I don't want to start a Windows vs Mac war in this thread but I've gotta say that if programming Windows was as easy as programming a Mac (especially in the area of using fonts and other graphics functions) then this particular forum would be a hell of a lot smaller in size (I note the lack of Mac programming related forums at Tek-Tips!).

All that being said, C++ is a much richer language than Java. Although Java has its roots in C/C++, it is actually like a simplified version of C++.
What I would do (and I pulled this idea direct from CUJ magazine!) if I were you, is build and test your program every few of lines of code thereby just about eliminating the need for a debugger at all.
Give it some time jms and I think you'll get used to it. The more you get used to a particular environment, the more you'll get to appreciate its good points and live with the bad points.

[machinegun][pc2]
tellis.gif

[sup]programmer (prog'ram'er), n A hot-headed, anorak wearing, pimple-faced computer geek.[/sup]​
 
Hi,
There are several debugging optons available to pinpoint the location of problem. VC++ IDE it is a ocean.


for ur problem of inaccurate location of error U please try this.

Go to DEBUG menu->Exceptions->
select all the entries in the window and check the stop always option.

This will help u to idetify the error at exact location.

S.Senthil kumar.
 
You are talking probably about compiler messages - debugger does not produce any error messages - it only allows to stop the executable at the breakpoint, execute it step-by-step, look for contents of variables etc.

1) In C++ only the first error message can be accepted as a real hint - all following messages can be only a result of previous errors. It is a feature of many languages, not of compilers itself.

2) Look for condensed error message at the left bottom side of the IDE window - it is better formatted. It appears when you double click some error message line.

3) All cases when I got a message "cannot save ..." were really if the source text was opened, by example, in another editor. Are you not trying to save the file while compilation stage is not yet completed?

Anyway - MSVC IDE I find quite good developing tool, it is similar to linux KDEvelop, which I like too. May be because I haven't tryed anything else? :)
 
3) Another possible reason for "cannot save ..." - you are trying to compile a program which is currently running.
 
jms137: No offence, but your post sounds like the frustrated rantings of someone who's trying to move up to a 'proper' programming language and finding it difficult.

1. I've never had the compiler or debugger point to the wrong place per se. What you have to understand is that C++ has many constructs and notations, so even if your code is incorrect for what you want to do, it may actually be valid, and it's not until several lines later that the code error YOU made will finally cause the compiler (or debugger) to give up and report an error. If you're the sort of person who just hacks in a lot of code and relies on the compiler to check it for you, you need to be using a more basic language. You cannot be lazy with C++, it's as simple as that.

A (very) simple example:
[tt]
for (int i = 0; i < 10; i++);
{
// do something using i
}
[/tt]
Because you've inadvertantly put a semi-colon at the end of the first line, whatever is within the braces will happen only once. It's not what you expected, but it's perfectly valid, and it's not until later you find that the array you expected to be populated with ten elements has only one.

As I said, this is a very simple example. They get a lot more complicated, but that isn't the compiler's fault!

2. Sometimes the error messages do extend past the right hand side of the screen. That's what the scroll bar is for. Yes, the messages could be formatted better; however, it's just a trace window!

3. I NEVER get this error. It sounds to me like you're trying to save a source file that you've got open in another editor. A bit of care should eliminate this.

As qednick suggested, give it time and you'll learn to do things properly. Check your code, don't rely on the compiler to do it for you; remember, the IDE doesn't know what you're trying to achieve! :)
 
&quot;the frustrated rantings of someone who's trying to move up to a 'proper' programming language and finding it difficult.&quot;

!! ha ha that's quite funny, and true.

What I have found out straight away is that C++ is a considerably bigger(amount of syntax conventions) and richer (features) language than Java. I would say that there are lots of people who could churn out a program in Java but would be incapable of doing so in C++, because the difficulty level is higher.

I wish that I had been taught C++ first, then moved to Java. That would be so much easier than the other way round. However, I do feel some pride in that I am getting on fairly well with C++(despite my ranting) and none of the people on my course (just finished a degree) know C++ and are too scared of it to learn it. Java makes things easy for you, VERY easy. However, I think that if one wants to make a career as a programmer, one must learn C++.

I wouldnt go so far as to say Java is not a proper language. If this is true then I don't know what VB is! Java is a widely used language. I think there is a large contingent of people who have significant C++ experience and are quite entrenched, and think that Java is a joke.

If Java were such a joke, then how come Microsoft .NET has switched to using a virtual machine too,,.. and C# is EXTREMELY similar to Java. [soapbox]

take care,
john


 
John, you've hit the nail on the head! Just give it time, get yourself a couple of good VC++ and C/C++ books to read over the hols and you'll be well on your way - believe me!

I recall reading in a Java book where the author was discussing learning Java when you already know C/C++. I guess the same applies when it's the other way around. It went something like this:

When you already know C/C++ and you're trying to learn Java, it's kind of like a German trying to learn Dutch. The similarities are there but just not quite enough for things to make sense!

As for the &quot;cannot save file because it is in use&quot; error. I can guarantee all that the file is not in use!! It is a definite bug in VC++ 6.0 - perhaps it only affects certain systems?
tellis.gif

[sup]programmer (prog'ram'er), n A hot-headed, anorak wearing, pimple-faced computer geek.[/sup]​
 
&quot;I've never had the compiler or debugger point to the wrong place per se.&quot;

I have!!! I forget the examples that really pissed me off, but I've spent half an hour trying to track down some sort of error just to learn that a letter in a function definition wasn't capitalized or something. Again, I forget the exact circumstances of what frustrated me, but I do remember that 1. the compiler certainly should've had a warning related to the mispelling (or whatever the problem was) but didn't, and 2. all of the other errors it was giving weren't a problem at all.

Most recently, I was frustrated when I couldn't use logic that returned an integer through a series of function calls in an analysis. It was something like

if( thisGroup.getSomething( something.getObject() ).returnInteger
< 0 )

I know the logic was fine, but I got an &quot;internal compiler error&quot; that said I should try turning the optimization off (so the compiler BROKE my code! Grrrrrr!!!) I didn't figure out how to turn optimization off, so I just assigned the value of the above to variable &quot;microsoftSux&quot; and used it in the control structure and everything worked fine.

For the most part, I think the VS IDE is okay, but it seems like its functionality could improve. For example, in VC++ 6, when I want to delete a text file from a project I have to &quot;remove it&quot; from the project, and then go into the project file and delete it using Windows explorer. Maybe there's a simpler way, but I'm learning to navigate the IDE as I go, and VS navigation is certainly not as intuitive as getting around in, say, MS Office (though I see no reason why it can't be).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top