0
votes

When I try to debug a code in Visual C++ 2010, in the Output box, there's some notification :

'latihan.exe': Loaded 'C:\Users\sinta\Documents\Visual Studio 2010\Projects\latihan\Debug\latihan.exe', Symbols loaded.
'latihan.exe': Loaded 'C:\Windows\System32\ntdll.dll', Cannot find or open the PDB file
'latihan.exe': Loaded 'C:\Windows\System32\kernel32.dll', Cannot find or open the PDB file
'latihan.exe': Loaded 'C:\Windows\System32\KernelBase.dll', Cannot find or open the PDB file
'latihan.exe': Loaded 'C:\Windows\System32\mpich2mpi.dll', Cannot find or open the PDB file 'latihan.exe': Loaded 'C:\Windows\System32\msvcr100d.dll', Symbols loaded.
The program '[1008] latihan.exe: Native' has exited with code 0 (0x0).

The code :

#include <stdio.h>

int main ()
{
    printf ("Welcome \n");
    return 0;
}

I just want to know, :)

2
There are 7 notifications, which one are you asking about?Hans Passant
The meaning of all notifications. I'm sorry if the question looks stupid, I'm newbie :-)sintakartika

2 Answers

1
votes

Those messages mean that your system is missing the symbol files (.pdb, for program database) for various Windows DLLs. They're pretty harmless messages, since usually you won't really care about them, but if you want to get the symbols, you can obtain them via Microsoft's symbol servers.

1
votes

Right-click the Output window and you'll get a context menu:

enter image description here

The entries with the checkboxes correspond with what you posted. They are notifications generated by the debugger when something interesting happened in your program that you might want to know about. Unchecking one stops the corresponding type of message from being displayed. Documenting them all:

  • Exception messages. Any exception thrown in your program produces a "First chance" exception notification message. If the exception is not caught then you'll get another one and the debugger stops at the statement that threw the exception. You are always interested in exceptions since they usually indicate a problem.
  • Step filtering messages. Not relevant to C++ code, managed code has a "Just My Code" debugging feature that can automatically step over code you didn't write.
  • Module load messages. You'll get a message for every DLL that gets loaded into your process. You got those, messages 2 through 6. It also tells you whether it could find the debugging symbols for the DLL. You don't have the ones for these Windows DLLs because you didn't configure the symbol server. You don't really need them but they can be handy when a winapi call fails.
  • Module unload messages. Tells you when a DLL gets unloaded
  • Process exit messages. Tells you when your program stopped running. The last one in your snippet. You might be interested in the exit code, 0 is good.
  • Thread exit messages. Tells you when a thread stopped running, also displayed with an exit code.
  • Program output. Anything that the code in your program writes with OutputDebugString in a C/C++ program will appear in the Output window.

Everything looks normal in your snippet.