How to debug on the fly?
I dunno the exact therm for what I am looking for, I think it`s somewhere between interpreter, praser and static code checker.
Normally in C++ you write code and then you compile. If you made some mistakes like syntax errors the compiler will show you a error or a warning. The problem is that I find this way of coding, I will not say ineffective but it could be better.
I have seen a similar feature in visual studio and C#. If you make a mistake like a wrong type the ide will show you instantly an error and you can fix it. This saves a lot of time trying to compile it.
Now I want to see such a feature also for C++ (preferred as a visual studio addin).
I use Visual Assist from Whole Tomato - which beefs up "Intellisense", plus a lot more.
You mean "Edit and Continue"? That works in VS2005 with C++.
If that's not what you're using, you'll have to state your compiler.
> interpreter, praser and static code checker.
Wow, for a minute I mis-read that as "praiser".
What's that, a popup which appears from time to time to tell you how marvellous your code is, and what an awesome programmer you are ;)
That`s a nice tool, but not what I am looking for.
Originally Posted by Codeplug
No, I don`t mean that. I can edit the source while debugging but this is not what I mean.
Originally Posted by iMalc
What I mean is, you write code in editor and even before you compile you will see the errors you made, if any in some window.
Ok, it was not exactly C# where I saw this feature. But it was Visual Baisc.net. I made here a screenshot. I can already see any errors before I compile the source. This is really effective and I want some addin for visual studio or external tool / ide for that in C++.
That is a fairly complex procedure with C++, particularly when using for example templates. You could probably find SOME of the problems.
Originally Posted by sept
I work with writing small amounts of code and compiling that, then writing a bit more. At least for syntax that works - you obviously need a way to test the code to find logic problems, and that sometimes requires a bit more of a working code-set.
the need for a update->compile->run cycle is one of the drawbacks of using compilers. this isn't solved completely. you have to stick to interpreters if you really want this.
Originally Posted by sept
but god gave use make and precompiled headers to make life much better for us. use them and be happy
by the way: what I've always asked myself is: every compiler needs a parser. that parser is 100% complete and correct in it's function. why doesn't compiler vendors make their parsers available also to external programs (IDEs for expamle) through a library?
> If you make a mistake like a wrong type the ide will show you instantly an error and you can fix it.
Sooner or later, you'll need to take the training wheels off your bicycle and learn to ride by yourself.
If you're a reasonably fast typist, and you know what you're doing, these kinds of tools rapidly start to get in the way. On the large projects where they might start to be useful, the performance falls away with the amount of information they have to sift through.
> the need for a update->compile->run cycle is one of the drawbacks of using compilers.
All compilers (and by extension, all IDEs) also have the option of "Compile Only" to just compile the current source file. This normally takes only seconds and then you have a nice error list (or not) to advance your way through.