Debuggers, how to use?

This is a discussion on Debuggers, how to use? within the A Brief History of Cprogramming.com forums, part of the Community Boards category; i dont understand debuggers. i have no clue how to use them to my advantage. i cna set breakpoints, thats ...

  1. #1
    Emotionally Unstable DarkViper's Avatar
    Join Date
    Oct 2002
    Posts
    343

    Debuggers, how to use?

    i dont understand debuggers. i have no clue how to use them to my advantage. i cna set breakpoints, thats the easy part, but then, whenever i press "debug" nothing happens. it recompiles the program, or in flash, it does nothing, as the breakpoints are in certain frame of actionscript.

    but, i have Bloodshed Dev-C++ and i would like to know how to use the debugger, as it might actually help me! (besides recompiling it everytime to notice nothing has really changed!)

    i dont have MSVC++, and i dont ever really plan on getting it, the resource editor is top notch, but i dont like the complexity of it (its really not beginner-friendly) so dont tell me how to debug using MSVC++. Bloodshed Dev-C++ is what i gots.
    ~DJ DarkViper signing out
    ----------------------------------------
    My Site:
    Black Jaguar Studios

    Languages:
    Fluent English, Starter German, HTML, Javascript, Actionscript, Intermediate PHP

    Verteran Despiser of: ASP, Java, BASIC, Pascal, Cobalt

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    All professionals use a debugger, I hope you can find something on Bloodshed. As you know, I've worked with you on the Windows board, and an elemental use of the debugger would have helped you a lot. I can't help you with this, I use VC.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  3. #3
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    I am beginning to develop a large interest in using the VC debugger, i hope to learn soon.

  4. #4
    Unleashed
    Join Date
    Sep 2001
    Posts
    1,765
    i dont have MSVC++, and i dont ever really plan on getting it, the resource editor is top notch, but i dont like the complexity of it (its really not beginner-friendly)
    I thought it was fine. I still think it's fine. What parts intimidate you? What parts give you trouble?

    Maybe someone who is a VC++ fanatic can help you out with it. If you're willing to try, I'm sure someone would love to share it's many tricks with you.
    The world is waiting. I must leave you now.

  5. #5
    Shadow12345
    Guest
    how do you get it to show exactly where the program ended. My application keeps crashing, I know it's something stupid but I would be able to find it if it only told me where exactly the app ended.

  6. #6
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    step thru it line by line. Most debuggers will offer that facility.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  7. #7
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386
    >i dont have MSVC++, and i dont ever really plan on getting it

    It has a great debugger.

    I'm working on embedded software projects, I'd like to use a debugger, but I can't. Therefore I have to put a lot of diagnostic functionality in the code, like printf's and it works fine with me.

  8. #8
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    >>> I'm working on embedded software projects, I'd like to use a debugger, but I can't.

    If your embedded target is running Windows CE, you can connect to the target using Platform Builder, and run the application in the target through the Embedded VC++ debugger, takes a bit of fiddling to get it working, but once it is, it is just like debugging a local application.

    I have also seen this done with the Phar-Lap kernel, but they had to jump through some more serious hoops to get it to go, it is, however, possible.

    My old workgroup is currently developing for VMS, and have had some success in debugging that with VC, although in that case, I think the printf() route would probably have been easier.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  9. #9
    Funniest man in this seat minesweeper's Avatar
    Join Date
    Mar 2002
    Posts
    801
    Whilst on this topic, I am writing a multithreaded, WIN32 application using MSVC++. I have a bug that only occurs quite infrequently and I think it may be a small problem in my thread synchronisation. Is there any way with the MSVC++ debugger that I can view the operation of each thread simultaneously? Would Spy++ help me? I've never really looked at Spy++ but I seem to remember someone on here saying it was useful for WIN32 application debugging. Thanks in advance.

  10. #10
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    not to stray OT but i wanna ask since u brought it up, what is multithreading? and why are so many people confused by it?

  11. #11
    Funniest man in this seat minesweeper's Avatar
    Join Date
    Mar 2002
    Posts
    801
    The way I think of it is that it is like running multiple chunks of code, lets say two functions for arguments sake, simultaneously. Obviously they don't actually run simulataneously because a microprocessor can only only do one thing at a time. Windows allocates microprocessor time 'slices' to each thread that you are running so that all your threads, or chunks of code, appear to be running concurrently.

  12. #12
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    kinda like when a function calls another function? its stepping from one function to the next instead of just main? Sorry if i am misunderstanding.

  13. #13
    Funniest man in this seat minesweeper's Avatar
    Join Date
    Mar 2002
    Posts
    801
    No. Say the first line of your main function calls function 'A', the program would execute 'A', return from it and then move to the next line, where for our purposes we have function 'B'. So function 'B' wouldn't get a look in till 'A' had finished and returned. now lets make 'A' and 'B' threads. As soon as main has called 'A', 'A' begins executing, but at the same time as our main function is executing. So main goes straight to the next line and calls 'B', which also starts executing. So now we have 3 chunks of code running at the same time, 'A', 'B' and the main function.

  14. #14
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    ok that makes sense, would it not be less effiecent or prone to problems tho?

  15. #15
    Funniest man in this seat minesweeper's Avatar
    Join Date
    Mar 2002
    Posts
    801
    Well yeah I guess it might be less efficient in that every time windows allocates processor time to a new thread there is some extra processing involved in doing so. And it can also be quite problematic, you really need to thoroughly test your program, especially if numerous threads work with the same data. One thread might be reading an array whilst another writes to it and that sort of thing. However for some applications, and there are probably only a few, it can be a necessity.

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. GUI debuggers
    By nipun in forum Linux Programming
    Replies: 1
    Last Post: 03-26-2006, 01:11 PM
  2. Stupid question: What does Debugger do?
    By napkin111 in forum C++ Programming
    Replies: 6
    Last Post: 05-02-2002, 11:00 PM
  3. Debuggers
    By rip1968 in forum C++ Programming
    Replies: 5
    Last Post: 04-19-2002, 07:00 PM
  4. What are some good debuggers?
    By Nutshell in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 04-01-2002, 08:36 AM
  5. Low level debuggers
    By Korn1699 in forum C++ Programming
    Replies: 8
    Last Post: 03-27-2002, 01:39 PM

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