Hi
Thanks for coming back. Your link was a big help. A few points I didn't read over before has fixed the problem. It was in my build option settings I hadn't selected -g or turned off optimization.
Also, my project file path had spaces in it, so the break points weren't working.
I enabled the debuggers log as you asked above. Just wanted to see what it would display. I've pasted it below just for the exercise.
I'm just wondering, I've copied this from the Debugger tab next to the Cscope tab. I thought there may have been an html file output like the build log does. There doesn't seem to be, should there be?
There's a bit of extra junk below too
.
Also... I can't delete my old watches from the watch window. I right click on the window and select 'Delete all' and nothing happens. Every new project contains these old watches. Would you know what the problem is?
Building to ensure sources are up-to-date
Selecting target:
Release
Adding source dir: C:\CodeBlocksFiles\testDebugger\
Adding source dir: C:\CodeBlocksFiles\testDebugger\
Adding file: C:\CodeBlocksFiles\testDebugger\bin\Release\testDebugger.exe
Changing directory to: C:/CodeBlocksFiles/testDebugger/.
[debug]Command-line: C:\Program Files\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname -quiet -args C:/CodeBlocksFiles/testDebugger/bin/Release/testDebugger.exe
[debug]Working dir : C:\CodeBlocksFiles\testDebugger
Starting debugger: C:\Program Files\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname -quiet -args C:/CodeBlocksFiles/testDebugger/bin/Release/testDebugger.exe
done
[debug]> set prompt >>>>>>cb_gdb:
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
[debug]Reading symbols from C:\CodeBlocksFiles\testDebugger\bin\Release\testDebugger.exe...done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.6.1
[debug]Copyright (C) 2013 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law. Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "mingw32".
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]>>>>>>cb_gdb:
[debug]> set confirm off
Debugger name and version: GNU gdb (GDB) 7.6.1
[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 0
[debug]>>>>>>cb_gdb:
[debug]> set new-console on
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source C:\Program Files\CodeBlocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory C:/CodeBlocksFiles/testDebugger/
[debug]Source directories searched: C:/CodeBlocksFiles/testDebugger;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> break "C:/CodeBlocksFiles/testDebugger/main.cpp:10"
[debug]Breakpoint 2 at 0x4013bb: file C:\CodeBlocksFiles\testDebugger\main.cpp, line 10.
[debug]>>>>>>cb_gdb:
[debug]> break "C:/CodeBlocksFiles/testDebugger/main.cpp:11"
[debug]Breakpoint 3 at 0x4013f1: file C:\CodeBlocksFiles\testDebugger\main.cpp, line 11.
[debug]>>>>>>cb_gdb:
[debug]> break "C:/CodeBlocksFiles/testDebugger/main.cpp:16"
[debug]Breakpoint 4 at 0x401472: file C:\CodeBlocksFiles\testDebugger\main.cpp, line 16.
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: C:/CodeBlocksFiles/testDebugger/bin/Release/testDebugger.exe
Child process PID: 2352
[debug][New Thread 2352.0xa74]
[debug]Breakpoint 2, main () at C:\CodeBlocksFiles\testDebugger\main.cpp:10
[debug]C:\CodeBlocksFiles\testDebugger\main.cpp:10:126:beg:0x4013bb
[debug]>>>>>>cb_gdb:
At C:\CodeBlocksFiles\testDebugger\main.cpp:10
[debug]> info locals
[debug]a = {
[debug] static npos = <optimized out>,
[debug] _M_dataplus = {
[debug] <std::allocator<char>> = {
[debug] <__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
[debug] members of std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider:
[debug] _M_p = 0x3e2adc "Test1"
[debug] }
[debug]}
[debug]b = {
[debug] static npos = <optimized out>,
[debug] _M_dataplus = {
[debug] <std::allocator<char>> = {
[debug] <__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
[debug] members of std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider:
[debug] _M_p = 0x22ffe0 "ÿÿÿÿ°šƒ|xw\201|"
[debug] }
[debug]}
[debug]c = 2009288233
[debug]d = -1
[debug]>>>>>>cb_gdb:
[debug]> info args
[debug]No arguments.
[debug]>>>>>>cb_gdb:
[debug]> whatis d
[debug]type = int
[debug]>>>>>>cb_gdb:
[debug]> output d
[debug]-1>>>>>>cb_gdb:
Continuing...
[debug]> cont
[debug]Continuing.
[debug]Breakpoint 3, main () at C:\CodeBlocksFiles\testDebugger\main.cpp:11
[debug]C:\CodeBlocksFiles\testDebugger\main.cpp:11:151:beg:0x4013f1
[debug]>>>>>>cb_gdb:
At C:\CodeBlocksFiles\testDebugger\main.cpp:11
[debug]> info locals
[debug]a = {
[debug] static npos = <optimized out>,
[debug] _M_dataplus = {
[debug] <std::allocator<char>> = {
[debug] <__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
[debug] members of std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider:
[debug] _M_p = 0x3e2adc "Test1"
[debug] }
[debug]}
[debug]b = {
[debug] static npos = <optimized out>,
[debug] _M_dataplus = {
[debug] <std::allocator<char>> = {
[debug] <__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
[debug] members of std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider:
[debug] _M_p = 0x3e2b0c "Test2"
[debug] }
[debug]}
[debug]c = 2009288233
[debug]d = -1
[debug]>>>>>>cb_gdb:
[debug]> info args
[debug]No arguments.
[debug]>>>>>>cb_gdb:
[debug]> whatis d
[debug]type = int
[debug]>>>>>>cb_gdb:
[debug]> output d
[debug]-1>>>>>>cb_gdb:
Continuing...
[debug]> cont
[debug]Continuing.
[debug]Breakpoint 4, main () at C:\CodeBlocksFiles\testDebugger\main.cpp:16
[debug]C:\CodeBlocksFiles\testDebugger\main.cpp:16:255:beg:0x401472
[debug]>>>>>>cb_gdb:
At C:\CodeBlocksFiles\testDebugger\main.cpp:16
[debug]> info locals
[debug]a = {
[debug] static npos = <optimized out>,
[debug] _M_dataplus = {
[debug] <std::allocator<char>> = {
[debug] <__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
[debug] members of std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider:
[debug] _M_p = 0x3e2adc "Test1"
[debug] }
[debug]}
[debug]b = {
[debug] static npos = <optimized out>,
[debug] _M_dataplus = {
[debug] <std::allocator<char>> = {
[debug] <__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
[debug] members of std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider:
[debug] _M_p = 0x3e2b0c "Test2"
[debug] }
[debug]}
[debug]c = 1
[debug]d = 2
[debug]>>>>>>cb_gdb:
[debug]> info args
[debug]No arguments.
[debug]>>>>>>cb_gdb:
[debug]> whatis d
[debug]type = int
[debug]>>>>>>cb_gdb:
[debug]> output d
[debug]2>>>>>>cb_gdb:
Continuing...
[debug]> cont
[debug]Continuing.
[debug][Inferior 1 (process 2352) exited normally]
[debug]>>>>>>cb_gdb:
[Inferior 1 (process 2352) exited normally]
[debug]> quit
Debugger finished with status 0