Thread: looking for a c++ debugger with type/syntax check while coding

  1. #1
    Registered User
    Join Date
    Jul 2007
    Posts
    88

    looking for a c++ debugger with type/syntax check while coding

    My c++ debugger (integrated in visual studio 2005) lacks some useful features I have seen somewhere else (.net debugger in visual studio 2005).

    - In special I miss 'Just My Code debugging' which means I can step with singlestep though my code without jumping into anything not written by me such as the standardlib. That`s much better then the workarround with breakpoints or step over.

    - 'Debugging code at design time', to show me type errors, syntax errors and such just after I did type it (not just while compiling). Such a feature would be really awesome.

    Is there any c++ debugger better then the debugger inside visual studio?

  2. #2
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by sept View Post
    - In special I miss 'Just My Code debugging' which means I can step with singlestep though my code without jumping into anything not written by me such as the standardlib. That`s much better then the workarround with breakpoints or step over.
    Unless you place a breakpoint inside library code, step will never move outside "your" code. If you Step Into, you might. But then, you can always Step Out or Run to Cursor.

    Quote Originally Posted by sept View Post
    - 'Debugging code at design time', to show me type errors, syntax errors and such just after I did type it (not just while compiling). Such a feature would be really awesome.
    That's, to my knowledge an editor feature as far as C++ is concerned. Not a debugger one. One C++ editor at least does it in some form or another, or so I heard; Eclipse.


    Quote Originally Posted by sept View Post
    Is there any c++ debugger better then the debugger inside visual studio?
    Word of mouth is that visual studio debugger is one of the best, if not the best, Windows C++ debugger.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  3. #3
    Registered User
    Join Date
    Nov 2006
    Posts
    519
    Eclipse.
    Indeed, that does the job. Look for the new eclipse "europa", its distributed in a version together with the new cdt 4

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    I have found that Visual Studio debugger sometimes jumps "out of my code", but it's better than most I've used. This happens particularly when using base-classes that are declared in header-files or C-files that you haven't written (e.g. MFC library headers/sources). As others said, it is annoying but you can just jump out when this happens.

    I agree with the others that syntax checking is something the editor+compiler does. And as for doing it "only when you compile" - as long as your project isn't enormous, it's usually pretty fast to compile it. [This is of course not true if you modify a common headerfile in a project with 300K lines and have to recompile the lot - that may take several minutes or more, depending on the setup and what machine you have].

    Unfortunately, to completely parse and syntax check C++ (or similar), you need a pretty complete "compiler", so whilst the "code-generation part" of the compiler isn't needed (and that is a large portion), it's still a pretty complex matter. It's getting more complicated too by the fact that the editor/syntax checker will have to know all your include-paths and read all the files that are needed to compile the current file. Fine for small projects, but when you've got hundreds of header-files and other C++-files to read through to know if this will compile or not, you might just as well run the compiler - if you're lucky you get something you can run when you've finished...

    So my method (in general) is to compile often and fix the errors one or two at a time (because if you get 174 errors, it's usually lots caused by one or two of the first ones, and once you've fixed that, it's time to compile again, to see how many you've got left).

    Of course, attempting to NOT MAKE mistakes in the first place is always a good idea - but I can't manage that very often... :-)

    --
    Mats
    Last edited by matsp; 07-24-2007 at 04:30 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. BN_CLICKED, change button style
    By bennyandthejets in forum Windows Programming
    Replies: 13
    Last Post: 07-05-2010, 11:42 PM
  2. HELP!!!!emergency Problem~expert please help
    By unknowppl in forum C++ Programming
    Replies: 9
    Last Post: 08-21-2008, 06:41 PM
  3. HELP!!!!emergency ~expert please help
    By unknowppl in forum C Programming
    Replies: 1
    Last Post: 08-19-2008, 07:35 AM
  4. Please check this coding for me!
    By Doink in forum C Programming
    Replies: 2
    Last Post: 11-16-2007, 04:51 AM
  5. writing/reading from file produces double results.
    By stumon in forum C Programming
    Replies: 4
    Last Post: 03-20-2003, 04:01 PM