I understand. So what do I do if I simply wanna run my program without debugging? (assuming there's nothing to debug)
Printable View
I understand. So what do I do if I simply wanna run my program without debugging? (assuming there's nothing to debug)
Find menu item (or toolbar button) "start without debugging" and press it.
But note that you must use debugger, otherwise you won"t be able to find your bugs in code!
I see, F5 does the job.
Yes I'll keep that in mind, but it is important to be able to just test your program fluently as well.
Thank you all for the help.
The compiler will produce a .exe file with the name you have specified in the project properties. Open a command prompt window, change to the folder in which the .exe is located and simply type its name. If you no longer need to debug a program, then you can alter the project properties to produce a release build - rather than a debug build - which has optimisations enabled which will make the program execute faster.Quote:
So what do I do if I simply wanna run my program without debugging
I imagine I'll be developing in Debug Mode. I just develop and run the program fluently and when I encounter bugs I'll start debugging. Isn't it how it's done? Do you guys really press F10 countless times while developing even when there's no need for debugging?
If debugging, you can set break points, watches etc to hone in on the code that isn't doing what is expected or giving problems. Then use F10 to step through the code (or even F11 to step into called functions) to see what is happening. Once you know that the program 'works' to a certain point in the code then a new breakpoint can be set at that place so all the code previous is automatically executed.
I see, thanks that sounds useful.
There's always a need for debugging, or at least to verify your code is running correctly. I step through just about every line of code I write to make sure it's doing what I think it is. Buggy programs can still give correct results from time to time. Getting the output you expect is no guarantee the code is working properly.
I agree that debugging is needed from time to time, especially after writing some major code, but to execute line after line EVERY single time you run the program sounds very tiring and unnecessary. Sometimes you just make small changes that you know for sure that'll work and just want to see how they look.
Well it sounded like that from my point of view, I got the wrong impression then.
I'll step through each function I write, but when I'm sure it's doing what it's supposed to, there's no reason to visit it again. It's too easy to use a < instead or a > or to leave out a ! in an if statement to assume you get it right the first time. I work on very large programs and it's not reasonable to assume our testers will catch everything. The programmer has to put some effort into it too.
Yes I understand what you're talking about. We look at it the same way really. Thanks again.
Okay, I will.