Hi, I created a win32 console application starting with an empty project using Visual Studio 2005. I then added a cpp file and typed in the following code:
#include <iostream>
using namespace std;
int main()
{
cout << "Hello world!\n";
return 0;
}
When I try to run the program by pressing "Start Debugging" (F5), a console window appears then I get a popup saying : "There is no source code available for the current location." I then have an option to "Show Disassembly". I can see my output in the console window if I click "Start Without Debugging" (Ctrl+F5).
I searched the forum but don't seem to find anybody who has encountered the same problem. Does anybody have any idea what may be causing this
Thanks in advance.

cannot debug "Hello world!"
Jo&#227;o Marcelino
&#34411;&#35960;
PrakashV
I am choosing "Debug" in the combobox when I get the popup: "There is no source code available for the current location." with the option to choose "Ok" or "Show Disassembly"
I tried choosing "Release" in the combobox and got the popup: "No symbols are loaded for any call stack frame. The source code cannot be displayed." with the same option to choose either "Ok" or "Show Disassembly"
Also, I noticed that when I choose "Debug" in the combobox and try to debug, there is a yellow arrow pointing to "windows_Hook.DLL!004407ae()" in the call stack window after I choose "Ok"
Ed Teach
It is really supposed to work ...
Could there be something wrong with my installation
Hmm..
Niaz
dennist
Robert McIntyre - MSFT
Hi there,
these people have a point may be you should check your environment settings first before moving on to something else may you missed a small setting somewhere
Regards,
Smith
ikeeickholdt
I didn't place any breakpoints.
The only code I have is :
#include <iostream>
using namespace std;
int main()
{
cout << "Hello world!\n";
return 0;
}
By the way thanx a lot for trying to help ! :)
BLueDeViL
I'll just have to wait on then~
Thanx a lot for your help :)
ss23
It was something wrong with my computer.. Going to format my disk now..
Thanx a lot to Martin, Ayman and Smith for trying to help esp Martin ! Thanx a lot !
Sharkboy
There are to modes to create a EXE file. Debug and Release. There is a combobox in the toolbars that shows the current mode you are compiling and testing. Select debug and try it again.
The default settings for release build don't include debug symbols.
Rupesh Rao MSFT
Try cleaning the project. I am sure that is a scenario that works. Also delete any old pdb files.
Thanks, Ayman Shoukry VC++ TeamHariValath