User forums > Using Code::Blocks
debuging the code: how add variables and arrays objects to watches window?
cambalinho:
i think i did. but i don't have sure... can you tell me more about?
oBFusCATed:
If you see the debug: at the beginning of the line, then you have done it.
cambalinho:
heres what i see on debug tab:
"Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\Users\Cambalinho\Documents\CodeBlocks\classcontrols\
Adding source dir: C:\Users\Cambalinho\Documents\CodeBlocks\classcontrols\
Adding file: C:\Users\Cambalinho\Documents\CodeBlocks\classcontrols\bin\Debug\classcontrols.exe
Changing directory to: C:/Users/Cambalinho/Documents/CodeBlocks/classcontrols/bin/Debug
Set variable: PATH=.;C:\Program Files (x86)\CodeBlocks\mingw32\i686-w64-mingw32\lib;C:\Program Files (x86)\CodeBlocks\mingw32\bin;C:\Program Files (x86)\CodeBlocks\mingw32;C:\Program Files (x86)\PC Connectivity Solution;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\ProgramData\Oracle\Java\javapath;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Broadcom\Broadcom 802.11\Driver;C:\Program Files (x86)\Skype\Phone
Starting debugger: C:\Program Files (x86)\CodeBlocks\mingw32\bin\gdb.exe -nx -fullname -quiet -args C:/Users/Cambalinho/Documents/CodeBlocks/classcontrols/bin/Debug/classcontrols.exe
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.6
Child process PID: 4636"
i'm sorry, i know that i'm miss something, but i don't know what :(
i don't see the result of 'OutputDebugString("hello world");' :(
oBFusCATed:
Obviously you've not enabled full logging...
Settings -> Debugger -> Common -> Full (Debug) Log...
And when pasting please use code tags (the # button above the editor).
cambalinho:
now it's the full, but the:
--- Code: ---OutputDebugString("hello world");
--- End code ---
isn't showed on it :(
--- Quote ---Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\Users\Cambalinho\Documents\CodeBlocks\classcontrols\
Adding source dir: C:\Users\Cambalinho\Documents\CodeBlocks\classcontrols\
Adding file: C:\Users\Cambalinho\Documents\CodeBlocks\classcontrols\bin\Debug\classcontrols.exe
Changing directory to: C:/Users/Cambalinho/Documents/CodeBlocks/classcontrols/bin/Debug
Set variable: PATH=.;C:\Program Files (x86)\CodeBlocks\mingw32\i686-w64-mingw32\lib;C:\Program Files (x86)\CodeBlocks\mingw32\bin;C:\Program Files (x86)\CodeBlocks\mingw32;C:\Program Files (x86)\PC Connectivity Solution;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\ProgramData\Oracle\Java\javapath;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Broadcom\Broadcom 802.11\Driver;C:\Program Files (x86)\Skype\Phone
[debug]Command-line: C:\Program Files (x86)\CodeBlocks\mingw32\bin\gdb.exe -nx -fullname -quiet -args C:/Users/Cambalinho/Documents/CodeBlocks/classcontrols/bin/Debug/classcontrols.exe
[debug]Working dir : C:\Users\Cambalinho\Documents\CodeBlocks\classcontrols\bin\Debug
Starting debugger: C:\Program Files (x86)\CodeBlocks\mingw32\bin\gdb.exe -nx -fullname -quiet -args C:/Users/Cambalinho/Documents/CodeBlocks/classcontrols/bin/Debug/classcontrols.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:\Users\Cambalinho\Documents\CodeBlocks\classcontrols\bin\Debug\classcontrols.exe...
[debug]done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.6
[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 "i686-w64-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
[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 disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Function "__cxa_throw" not defined.
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source C:\Program Files (x86)\CodeBlocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory C:/Users/Cambalinho/Documents/CodeBlocks/classcontrols/
[debug]Source directories searched: C:/Users/Cambalinho/Documents/CodeBlocks/classcontrols;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> break "C:/Users/Cambalinho/Documents/CodeBlocks/classcontrols/main.cpp:79"
[debug]Breakpoint 2 at 0x405869: file C:\Users\Cambalinho\Documents\CodeBlocks\classcontrols\main.cpp, line 79.
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: C:\Users\Cambalinho\Documents\CodeBlocks\classcontrols\bin\Debug\classcontrols.exe
Child process PID: 1704
[debug][New Thread 1704.0xdd4]
[debug][New Thread 1704.0x850]
[debug][New Thread 1704.0x10fc]
[debug][New Thread 1704.0xe18]
[debug][New Thread 1704.0x1200]
[debug][New Thread 1704.0xcf8]
[debug]Breakpoint 2, WinMain@16 (hThisInstance=0x400000, hPreviousInstance=0x0, lpCmLine=0x8b3ad5 "", nCmdShow=10) at C:\Users\Cambalinho\Documents\CodeBlocks\classcontrols\main.cpp:79
[debug]C:\Users\Cambalinho\Documents\CodeBlocks\classcontrols\main.cpp:79:1830:beg:0x405869
[debug]>>>>>>cb_gdb:
At C:\Users\Cambalinho\Documents\CodeBlocks\classcontrols\main.cpp:79
[debug]> info locals
[debug]arraysize = -1
[debug]i = 1
[debug]>>>>>>cb_gdb:
[debug]> info args
[debug]hThisInstance = 0x400000
[debug]hPreviousInstance = 0x0
[debug]lpCmLine = 0x8b3ad5 ""
[debug]nCmdShow = 10
[debug]>>>>>>cb_gdb:
Continuing...
[debug]> cont
[debug]Continuing.
Trying to pause the running process...
[debug][New Thread 1704.0xd14]
[debug]Program received signal SIGTRAP, Trace/breakpoint trap.
[debug][Switching to Thread 1704.0xd14]
[debug]0x7734000d in ntdll!DbgBreakPoint () from C:\Windows\system32\ntdll.dll
[debug]>>>>>>cb_gdb:
Program received signal SIGTRAP, Trace/breakpoint trap.
In ntdll!DbgBreakPoint () (C:\Windows\system32\ntdll.dll)
[debug]> quit
Debugger finished with status 0
--- End quote ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version