vtortola

Hi!

When I try break the execution o put a breakpoint, i get this error:

No symbols are loaded for any call stack frame. The source code cannot be displayed.

I'm using a VC++ General Empty project, what could be the problem

Regards.



Re: Visual C++ General Cannot debug

Nishant Sivakumar

Have you enabled symbols Perhaps you are running the Release version which by default does not generate symbols.




Re: Visual C++ General Cannot debug

TilakGopi

Hi,

Generally this happens, when you try to step into any standard libary functions such as printf.

What is your function call getting you the above message box.

Thans & Best Regards,

Ch.T.Gopi kumar.






Re: Visual C++ General Cannot debug

Simple Samples

V.Tortola wrote:
I'm using a VC++ General Empty project, what could be the problem
You must have source code to debug. You need to add a program to your empty project.




Re: Visual C++ General Cannot debug

V.Tortola

I have the source code, in fact the code is writing by me Big Smile

How can i add a program to my empty project

I have two headers files and two cpp files, i select "Debug" in the plataform manager, and i can execute the app .... but i can't put a breakpoing, nevertheless a friend can put a breakpoint and stop the execution with the same source files and Eclipse, what's the problem

Regards.






Re: Visual C++ General Cannot debug

Simple Samples

V.Tortola wrote:
How can i add a program to my empty project

Right-click on the project in the solution explorer then select "Add | Existing Item".

V.Tortola wrote:

i can execute the app

If you can execute it, can you build it Did you build it using the same system you are not able to debug with Is it a debug build If any of those questions are a duplicate of what you have already answered, then I apologize.

If you can build it using your system, then it is not an empty project.






Re: Visual C++ General Cannot debug

vtortola

The app have two headers files and three cpp files, one of this cpp files, containt a main method.

The app, runs fine in debug and in release, but in debug i can't put a breakpoint (in release i can't do it either, of course). The source code compile OK, and i can build the app.

"Empty project" is a template in Visual Studio 2005, follow "New Project", "VC++", "General", "Empty project", and then i add the files to the project.


Regards.





Re: Visual C++ General Cannot debug

scor7910

First, Check your project configuration is debug mode.

Second, Close project and delete debug folder, [filename].opt and [filename].ncb in your project directory.






Re: Visual C++ General Cannot debug

Holger Grund

Is this a message box Can you still do any of the usual debug commands (e.g. single-stepping in the disassembler window) I think this indicates a much more profund error condition than the ones indicated by other posters. However, I believe I have seen something similar for what looks like a combination of broken debug information and a debugger bug in handling these. Generally speaking, it's perfectly possible to debug a live target without symbols. The debugger will guest the steps to unwind the call stack. For optimized code, that will rarely work, but you'd simply get an incorrect callstack

I'd make sure that you have the native debug engine (that's somewhere in the "General" section of the project config IIRC) and that you don't have broken symbols.

-hg





Re: Visual C++ General Cannot debug

vtortola

Is a messagebox, and yes, appears a profund error Sad

Please, try to debug with this project in Visual C++ ... i don't have ideas yet Sad

I uploaded the VS2005 project here :







Re: Visual C++ General Cannot debug

Simple Samples

When uploading a project such as that, you can delete the ncb file first; you should at least delete it from the zip file. The ncb file will always be re-created and is usually quite large. You at least did exclude the pch file, which is also big. You can also delete the obj files. When I deleted the ncb file and the obj files, your project zipped to 11 KB.

Your project does not create a debug exe file for the debug configuration. The optimizations are turned on, although they should be off for a debug build. The runtime library is not a debug version. In the C/C++ "General" node of the project properties, the debug information format is set to disabled, which I assume means that debug information will not be created. When I fix all those, it still can't find debug information.

Your project exists in a strange way. The directories are not normal. I suspect that there is a problem causing the debug information to be put someplace where the debugger is not expecting it to be. Instead of figuring that out, I think it would be better to create a new project and move or copy the code to the new project. One thing that can be confusing is the option to create a new directory for a new project; don't do that. It is not logical; I have created projects using the option (a checkbox) to create a directory and the project had an extra directory that I did not need, in the manner that your project does.

I think it will help you very much to know how to create the project. That will help you now and many times in the future. So perhaps instead of creating an empty project, you can create a simple "Hello World" project or whatever it is called. Build the project immediately after creating it, to verify it works. Then replace the source code with yours as needed.






Re: Visual C++ General Cannot debug

Holger Grund

I cannot repro your problem. Debugging works, just without symbols. You don't generate debug information. You need the /ZI or /Zi compiler switches and the /DEBUG linker switch. You can look these up in MSDN Library index (with the leading slash) to find the corresponding IDE setting.

The debugger will usually find the correct debug information on the same box, because the linker emits the full path name of the pdb file in the DLL or EXE. dumpbin /PDBPATH will reveal that piece of information.

Again, I believe the message box indicates a more serious problem which shouldn't usually happen - even if symbols are absent.

-hg





Re: Visual C++ General Cannot debug

vtortola

Holger Grund wrote:

I cannot repro your problem. Debugging works, just without symbols. You don't generate debug information. You need the /ZI or /Zi compiler switches and the /DEBUG linker switch. You can look these up in MSDN Library index (with the leading slash) to find the corresponding IDE setting.



Hum.. i will test it tomorow Smile