How to use a simple breakpoint

This is a discussion on How to use a simple breakpoint within the C Programming forums, part of the General Programming Boards category; Hi I am trying to do something which should be very simple yet I can't get it to work. I ...

  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    20

    How to use a simple breakpoint

    Hi I am trying to do something which should be very simple yet I can't get it to work.

    I have visual studio 2005 here, and I am trying to use breakpoints in my program.

    I put some breakpoints on some lines I wanted the program to stop at, then hit F5 to rebuild the project and run it, but it doesn't stop at my breakpoints.

    At first it was saying something about needing symbols, so I went Tools->Options->Debug and added this URL: Symbol information to the symbols area. I got a little screen with the TOS or something and tried again and it still doesn't work.

    What am I doing wrong here? I can't believe I can't get this to work.

  2. #2
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,235
    Quote Originally Posted by NewbGuy View Post
    Hi I am trying to do something which should be very simple yet I can't get it to work.

    I have visual studio 2005 here, and I am trying to use breakpoints in my program.

    I put some breakpoints on some lines I wanted the program to stop at, then hit F5 to rebuild the project and run it, but it doesn't stop at my breakpoints.

    At first it was saying something about needing symbols, so I went Tools->Options->Debug and added this URL: Symbol information to the symbols area. I got a little screen with the TOS or something and tried again and it still doesn't work.

    What am I doing wrong here? I can't believe I can't get this to work.
    That symbol path is meaningless for your purposes. People use that for debugging Windows itself.

    You need to switch your Project Configuration to DEBUG before you can use breakpoints.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  3. #3
    Registered User
    Join Date
    Jun 2008
    Posts
    20
    Quote Originally Posted by brewbuck View Post
    That symbol path is meaningless for your purposes. People use that for debugging Windows itself.

    You need to switch your Project Configuration to DEBUG before you can use breakpoints.
    Is that the drop down beside the green play button on the main menu? It says debug already.

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by NewbGuy View Post
    Is that the drop down beside the green play button on the main menu? It says debug already.
    Then perhaps your breakpoint is in a piece of code that isn't being run?

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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. creating very simple text editor using c
    By if13121 in forum C Programming
    Replies: 9
    Last Post: 10-19-2010, 05:26 PM
  2. Simple message encryption
    By Vicious in forum C++ Programming
    Replies: 10
    Last Post: 11-07-2004, 10:48 PM
  3. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  4. Simple simple program
    By Ryback in forum C++ Programming
    Replies: 10
    Last Post: 09-09-2004, 05:48 AM
  5. Need help with simple DAQ program
    By canada-paul in forum C++ Programming
    Replies: 12
    Last Post: 03-15-2002, 07:52 AM

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