CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 26 of 26
  1. #16
    Join Date
    May 2006
    Location
    Dresden, Germany
    Posts
    458

    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
    Last edited by ProgramArtist; June 23rd, 2011 at 08:29 AM.

  2. #17
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,633

    Re: what is difference in compiling and debugging.

    Quote Originally Posted by vkash View Post
    How compiling is different from debugging.
    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.
    Last edited by Igor Vartanov; June 23rd, 2011 at 09:26 AM.
    Best regards,
    Igor

  3. #18
    Join Date
    Apr 1999
    Posts
    27,449

    Re: what is difference in compiling and debugging.

    Quote Originally Posted by vkash View Post
    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

  4. #19
    Join Date
    Oct 2002
    Location
    Austria
    Posts
    1,284

    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 View Post
    ... 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

  5. #20
    Join Date
    Apr 1999
    Posts
    27,449

    Re: what is difference in compiling and debugging.

    Quote Originally Posted by ZuK View Post
    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

  6. #21
    Join Date
    Mar 2011
    Location
    Delhi India
    Posts
    110

    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 View Post
    "Will pressing Ctrl+F5 create the same executable then pressing F5? And if so what's the difference?"
    Quote Originally Posted by Paul McKenzie View Post
    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)
    Last edited by vkash; June 23rd, 2011 at 10:47 AM.

  7. #22
    Join Date
    Oct 2002
    Location
    Austria
    Posts
    1,284

    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

  8. #23
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: what is difference in compiling and debugging.

    Quote Originally Posted by vkash View Post
    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 View Post
    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.
    Exactly!
    Victor Nijegorodov

  9. #24
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,637

    Re: what is difference in compiling and debugging.

    Quote Originally Posted by vkash View Post
    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.

  10. #25
    Join Date
    May 2006
    Location
    Dresden, Germany
    Posts
    458

    Re: what is difference in compiling and debugging.

    Quote Originally Posted by GCDEF View Post
    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

  11. #26
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,244

    Re: what is difference in compiling and debugging.

    Quote Originally Posted by vkash View Post
    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.
    Last edited by ovidiucucu; June 25th, 2011 at 02:20 AM.
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured