[CMake] Can't use Visual Studio Debugger with Cmake

Benoit benpaka.spam at gmail.com
Mon Jul 22 05:21:46 EDT 2013


Hi,

I have a serious problem to use VS2008 Debugger when I create a project
using CMake 2.8.11.1.

For example I am trying to "debug" the HelloDemo
project<http://www.cmake.org/cmake/help/examples.html>
.
So I do the following:

   1. Select Source Folder: C:/Program Files/CMake
   2.8/share/cmake-2.8/Example (Example files where available form .zip but
   not from .exe)
   2. Select build folder:  C:/Projects/builds/test_hellodemo
   3. Click on "Configure"
   4. Specify generator to VS 9 2008 and click Finish
   5. Set "CMAKE_BUILD_TYPE" to Debug.
   6. Click on "Generate"
   7. Open C:/Projects/builds/test_hellodemo/Hello.sln
   8. Build Solution (F7)
   9. Set breakpoint on hello.Print() function inside demo.cxx file.
   10. Start Debugging (F5) > Specify the executable file name by
   : C:\Projects\builds\test_hellodemo\Demo\Debug\helloDemo.exe

And then no debugger is launched!
Below is the output:

'helloDemo.exe': Loaded
> 'C:\Projects\builds\test_hellodemo\Demo\Debug\helloDemo.exe', Binary was
> not built with debug information.
> 'helloDemo.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll'
> 'helloDemo.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll'
> The program '[0x808] helloDemo.exe: Native' has exited with code 0 (0x0).


Do you have any idea what I am doing wrong! I though setting Build_type to
debug was enough!
The strange thing Is that I have used Cmake with OpenCV two years ago and I
don't remind this error!

 Cheers,

--
Benoit RAT
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130722/5b20dbe6/attachment.htm>


More information about the CMake mailing list