Code cannot debug.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • lukwagoroy

    #1

    Code cannot debug.


    Loaded 'ntdll.dll', no matching symbolic information found.

    I'm writing a small program. It compiled and run. But when trying
    to debug by select, I got the following
    error messages:

    Loaded 'ntdll.dll', no matching symbolic information found.
    Loaded 'D:\WINDOWS\sys tem32\kernel32. dll', no matching symbolic
    information found.
    Loaded 'D:\WINDOWS\sys tem32\wsock32.d ll', no matching symbolic
    information found.
    Loaded 'D:\WINDOWS\sys tem32\ws2_32.dl l', no matching symbolic
    information found.
    Loaded 'D:\WINDOWS\sys tem32\msvcrt.dl l', no matching symbolic
    information found.
    Loaded 'D:\WINDOWS\sys tem32\ws2help.d ll', no matching symbolic
    information found.
    Loaded 'D:\WINDOWS\sys tem32\advapi32. dll', no matching symbolic
    information found.
    Loaded 'D:\WINDOWS\sys tem32\rpcrt4.dl l', no matching symbolic
    information found.
    The thread 0xDD8 has exited with code 0 (0x0).



    --
    lukwagoroy
    ------------------------------------------------------------------------
    Posted via http://www.codecomments.com
    ------------------------------------------------------------------------

  • David Avsajanishvili

    #2
    RE: Code cannot debug - Alternative solution

    I cannot specify what is reason that you can't debug the program, but I can
    give you an alternative solution - try to use a macro to display debug
    information. This trick really helps, when classical debugging is very
    difficult or impossible.

    Include to your "stdafx.h" file following:

    #ifdef _DEBUG
    #define DEBUG_MESSAGE(m sg) MessageBox(NULL , msg, "Debug", 0)
    #else
    #define DEBUG_MESSAGE(m sg)
    #endif

    then, when you want to interrupt the program, include a macro in your code:

    ....
    AnyAction();
    DEBUG_MESSAGE(" Any action performed");
    ....

    In Debug compilation Message Box will appear, while in Release the Message
    Box (and it's corresponding code in binary) will not exist.

    I use it to debug my ActiveX DLL-s. Maybe it helps, if you will not find
    other way to debug your program.

    Regards!
    David

    Comment

    Working...