Re: what is difference in compiling and debugging.
Dear vkash,
Thx for your commendation but let me add a little bit to this thread.
In your original post you wrote:
Quote:
Originally Posted by vkash
How compiling is different from debugging.
Can you (now) see that you did not provide enough information to get the right answer?
The sentence you gave is missing the question tag (In my codeguru-forum-question-analyzer this will produce a warning, but no error :)).
You asked for the difference between compiling and debugging. This question will be interpreted by other users not the way you intended. At least for people using the compiler, linker and debugger every day. Some of the users here (including myself) have been programing for such a long time that they do remember these old times, when there wasn't an IDE (Integrated Development Environment) available. You had to use a (stand alone) editor for creating/editing the source code. Then you started (manually) a program that compiled it, if it didn't write errors to your console you started the linker. The debugger (if there was one) had to be started manually these times too.
Later you could make your life easier using make files (especially in *NIX systems, but there were equivalents in DOS/Windows too).
Nowadays many of us use the IDE's which are multi-purpose-tools. They are resource editors, source editors, auto source ident tools, source analyzers, compilers. linkers and debuggers as well. They are used for project management too. The problem resulting from that comfort is that newer users often don't know the differences/meanings of compile, link, debug, run etc.
Back to your original post:
Try to be more detailed when questioning. Say what you want to achieve, what you want to know. "Will pressing Ctrl+F5 create the same executable then pressing F5? And if so what's the difference?" could be a better approach.
regards
PA
Re: what is difference in compiling and debugging.
Quote:
Originally Posted by
vkash
How compiling is different from debugging.
Quote:
Red region gives me correct information.
Man, not to offend, but the first thing you should really learn is how to ask questions to be given with the right answers. As your original question was absolutely and totally misguiding. Your interest was about IDE behavior while your asking was seemingly about abstract terms having very special meanings for programmers.
Re: what is difference in compiling and debugging.
Quote:
Originally Posted by
vkash
Red region gives me correct information.
But that isn't the answer to the question you asked originally. It is just that someone stumbled onto something you liked the answer to.
Compiling is the action of taking source code, checking to see if the source code follows the rules of the language being used. If the source code follows the rules of the language, the compiler usually creates an intermediate file (object code of some type). If the rules are violated, the compiler may issue some sort of error diagnostics about the violation in the syntax rules.
Debugging is a term used to take a running program and diagnosing any errors, logical inconsistencies, bottlenecks, etc. by using automated means (an interactive debugger for example), pencil and paper, or even by spotting logical errors in the code by plain sight.
That is the difference between compiling and debugging. Note that I mention nothing about linking, since you didn't ask about linking, only compiling and debugging.
Regards,
Paul McKenzie
Re: what is difference in compiling and debugging.
Quote:
Originally Posted by vkash
How compiling is different from debugging..
Quote:
Originally Posted by
Paul McKenzie
... Note that I mention nothing about linking, since you didn't ask about linking, only compiling and debugging.
I don't even see a question about what debugging or compiling is.
The question was about the difference between two things that have nothing in common.
Kurt
Re: what is difference in compiling and debugging.
Quote:
Originally Posted by
ZuK
The question was about the difference between two things that have nothing in common.
Kurt
Might as well explain what each is, since the OP didn't know what they were (or didn't know initially).
Regards,
Paul McKenzie
Re: what is difference in compiling and debugging.
first of all sorry for wrong method of asking question.
i think now i understood little meaning of VictorN's answer that is
Quote:
Originally Posted by VictorN
Almost the same way as dressing is different from walking
he want to say that you dress before walking (get ready) similarly you compile code before debugging. Am i correct programmers.
for new persons who answer new question is
Quote:
Originally Posted by
ProgramArtist
"Will pressing Ctrl+F5 create the same executable then pressing F5? And if so what's the difference?"
Quote:
Originally Posted by
Paul McKenzie
But that isn't the answer to the question you asked originally. It is just that someone stumbled onto something you liked the answer to.
Compiling is the action of taking source code, checking to see if the source code follows the rules of the language being used. If the source code follows the rules of the language, the compiler usually creates an intermediate file (object code of some type). If the rules are violated, the compiler may issue some sort of error diagnostics about the violation in the syntax rules.
Debugging is a term used to take a running program and diagnosing any errors, logical inconsistencies, bottlenecks, etc. by using automated means (an interactive debugger for example), pencil and paper, or even by spotting logical errors in the code by plain sight.
That is the difference between compiling and debugging. ] Note that I mention nothing about linking, since you didn't ask about linking, only compiling and debugging.
give me some detail on linking and other things(if they are). Knowledge in any technical field(which i can understand) is always welcomed by me.
when i pres Ctr+F5 this thing come in output windows
Code:
------ Build started: Project: test, Configuration: Debug Win32 ------
Compiling...
main.cpp
Linking...
Embedding manifest...
Build log was saved at "file://e:\Users\Vikash Chandola\Documents\Visual Studio 2008\Projects\test\test\Debug\BuildLog.htm"
test - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
you have already told about compiling so tell about others.
specially blue region.
debugging output window is somewhat difference following.
Code:
'test.exe': Loaded 'E:\Users\Vikash Chandola\Documents\Visual Studio 2008\Projects\test\Debug\test.exe', Symbols loaded.
'test.exe': Loaded 'E:\Windows\System32\ntdll.dll'
'test.exe': Loaded 'E:\Windows\System32\kernel32.dll'
'test.exe': Loaded 'E:\Windows\System32\KernelBase.dll'
'test.exe': Loaded 'E:\Program Files\AVAST Software\Avast\snxhk.dll'
'test.exe': Loaded 'E:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.1_none_bb1f6aa1308c35eb\msvcp90d.dll'
'test.exe': Loaded 'E:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.1_none_bb1f6aa1308c35eb\msvcr90d.dll'
The program '[3184] test.exe: Native' has exited with code 0 (0x0).
many files are loaded during the whole process what are these files(some files are seeming to be of windows OS).
during process even my antivirus is loaded why it was loaded. It has no relation with VC++ ? is it's my antivirus real time protection that let it to come here to test everything. (it's guess)
Re: what is difference in compiling and debugging.
@Paul:
Sorry, I didn't want to criticise your reply. Just couldn't help to add "something" to that thread.
I just don't like responses like
Quote:
Originally Posted by vkash
then answer it.
I am waiting for a good reply.
or
Quote:
Originally Posted by vkash
what do you mean? please answer in c++ way not in metaphorical way.
Kurt
Re: what is difference in compiling and debugging.
Quote:
Originally Posted by
vkash
first of all sorry for wrong method of asking question.
i think now i understood little meaning of VictorN's answer that is
Quote:
Originally Posted by
VictorN
Almost the same way as dressing is different from walking. :cool:
he want to say that you dress before walking (get ready) similarly you compile code before debugging.
Exactly! :) :thumb:
Re: what is difference in compiling and debugging.
Quote:
Originally Posted by
vkash
first of all sorry for wrong method of asking question.
i think now i understood little meaning of VictorN's answer that is
he want to say that you dress before walking (get ready) similarly you compile code before debugging. Am i correct programmers.
for new persons who answer new question is
give me some detail on linking and other things(if they are). Knowledge in any technical field(which i can understand) is always welcomed by me.
when i pres Ctr+F5 this thing come in output windows
Code:
------ Build started: Project: test, Configuration: Debug Win32 ------
Compiling...
main.cpp
Linking...
Embedding manifest...
Build log was saved at "file://e:\Users\Vikash Chandola\Documents\Visual Studio 2008\Projects\test\test\Debug\BuildLog.htm"
test - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
you have already told about compiling so tell about others.
specially
blue region.
debugging output window is somewhat difference following.
Code:
'test.exe': Loaded 'E:\Users\Vikash Chandola\Documents\Visual Studio 2008\Projects\test\Debug\test.exe', Symbols loaded.
'test.exe': Loaded 'E:\Windows\System32\ntdll.dll'
'test.exe': Loaded 'E:\Windows\System32\kernel32.dll'
'test.exe': Loaded 'E:\Windows\System32\KernelBase.dll'
'test.exe': Loaded 'E:\Program Files\AVAST Software\Avast\snxhk.dll'
'test.exe': Loaded 'E:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.1_none_bb1f6aa1308c35eb\msvcp90d.dll'
'test.exe': Loaded 'E:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.1_none_bb1f6aa1308c35eb\msvcr90d.dll'
The program '[3184] test.exe: Native' has exited with code 0 (0x0).
many files are loaded during the whole process what are these files(some files are seeming to be of windows OS).
during process even my antivirus is loaded why it was loaded. It has no relation with VC++ ? is it's my antivirus real time protection that let it to come here to test everything. (it's guess)
Information about compiling and linking is all over the internet. It's not hard to find and article. And that loading of DLLs, while it may appear in your output window, really has nothing to do with debugging.
Re: what is difference in compiling and debugging.
Quote:
Originally Posted by
GCDEF
Information about compiling and linking is all over the internet. It's not hard to find and article. And that loading of DLLs, while it may appear in your output window, really has nothing to do with debugging.
Not the loading itself. But the fact that all dynamic linked modules are shown to the user is one feature of the integrated debugger, isn't it? The window where these dll names appear is called "Debug" in my German installation od MSVC...
regards
PA
Re: what is difference in compiling and debugging.
Quote:
Originally Posted by
vkash
during process even my antivirus is loaded why it was loaded.
That's because the antivirus is a bad kid who is looking at you trough the keyhole. ;)
In other words, it injects code in your process to monitor it.
Anyhow, try first to understand general programming concepts like:
Just looking "in the keyhole" (i.e. in the IDE windows), is not the best method to learn.