Visual Studio 2005 - Debug code with compile errors?

This is a discussion on Visual Studio 2005 - Debug code with compile errors? within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Hi, Some code I'm trying to create won't build and so am receiving a "unable to build, run last successful ...

  1. #1
    Registered User
    Join Date
    Aug 2007
    Location
    U.K.
    Posts
    148

    Visual Studio 2005 - Debug code with compile errors?

    Hi,

    Some code I'm trying to create won't build and so am receiving a "unable to build, run last successful build?" message.

    Is it possible to step through code with the debugger whilst an error(s) still exists at all?

    Many thanks!

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Yes and no.

    Yes, you can step through the previously compiled code.

    No, you it won't make ANY sense to do so. If you have made anything but the most trivial changes, the line-numbers won't match up, so likely is that you won't get ANYTHING useful out of such an exercise.

    Compiler errors prevent the compiler from producing the final output because the compiler errors mean that there's something "missing" (or misplaced, etc), and the compiler just can't produce something useful.

    Consider something sending you a message (e-mail for example) to say "Let's meet around 6pm at". The place to meet at is obviously missing. So do you then follow the message and go wait at a random place at 6pm, or do you ask the sender to specify WHERE?

    Same with the compiler: if it doesn't get the message, it will not GUESS what you wanted to have happen. It tells you what is "missing", then asks you to rectify the situation.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Registered User
    Join Date
    Aug 2007
    Location
    U.K.
    Posts
    148
    Thank you matsp



    Appreciated.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Testing some code, lots of errors...
    By Sparrowhawk in forum C Programming
    Replies: 48
    Last Post: 12-15-2008, 04:09 AM
  2. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 02:01 AM
  3. Problem Compiling Program
    By wco5002 in forum C++ Programming
    Replies: 13
    Last Post: 11-06-2007, 12:56 PM
  4. Learning OpenGL
    By HQSneaker in forum C++ Programming
    Replies: 7
    Last Post: 08-06-2004, 09:57 AM
  5. odd errors from msvc std library files
    By blight2c in forum C++ Programming
    Replies: 6
    Last Post: 04-30-2002, 01:06 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21