The Debugger Pane

Attach:debuggerpane.png Δ | The Debugger Pane, showing its menu (click the marker in the top-left corner)


Much of the interaction between CodeLite and the debugger happens via the Debugger Pane. This appears automatically when a debugging sessions starts;
it's usually next to the Output View, but it can be detached and moved around if you like (I've done so for these screenshots). It currently contains seven tabs:



The Locals Tab



Attach:LocalsTab.png Δ | The Locals tab, also showing the code being debugged



The Locals tab provides an automatic view of the current stack-frame's variables. It updates after each debugger command e.g. Next, Step, which makes it convenient to use.
It correctly shows that n==2, as this is the third iteration of the loop. More importantly it can also show directly the value of a wxString, even in a unicode build (however see the option to turn off this behaviour in the Debugger Settings dialog.



Attach:LocalsTabDisplayVariable.png Δ | Activating an item lets you expand it
If you need to investigate an item further, you can do this by double-clicking (or optionally single-clicking: see the wxChoice...) on the item. This will open in a 'Display Variable' dialog, where it can be expanded as required.



The Watches Tab

Attach:watches.png Δ

A Watch is a continuous view of a variable or expression: every time the debugger pauses, CodeLite queries it, so that each expression is updated.
You can add new watches by clicking "New" on this tab's toolbar; or, more easily, by right clicking on an expression and selecting e.g. 'Add Watch', or 'Watch foo as wxString'.
The Watches tab will then show the contents of wxString foo correctly, even in a unicode build.

Attach:watchescontextmenu.png Δ | A Watch's Context Menu



You can dereference or edit the expression in a watch via its context menu; the new expression will then be evaluated.

You can also double-click it, when it will be opened in a 'Display Variable' dialog.




The Ascii Viewer

Attach:asciiviewer1.png Δ



Attach:asciiviewer2.png Δ



Displaying data in the Locals and Watches tabs are all very well, but something quick and flexible would be even better. CodeLite has two methods of doing this. One is to use a sort of complex tooltip: see the 'Display Variable' dialog.

Some people will find the tooltip a bit intrusive. An alternative is the Ascii Viewer, which displays similar information, less transiently. Large amounts of data can easily be viewed, using the scrollbars. And you can even copy the data to the clipboard.

One disadvantage is that, while it's part of the Debugger pane, you can't see the data when you're looking at one of the other tabs. The solution is to detach it (right-click over its tab and choose 'Detach'). You can then dock the detached 'tab' elsewhere, or let it float.



The Callstack Tab


Attach:callstack.png Δ

Whenever the debugger is paused, the Call Stack tab shows the call stack, with the current frame indicated. Double-clicking on a line will change the stack to that frame, and also open the source-code at that line.

This image shows level 2 and the corresponding code.



The Breakpoints Tab



Attach:breakpointpane1.png Δ



This tab displays details of all current breakpoints and watchpoints. You can add more, edit current ones (via the Edit button, or by right-clicking an item), and delete one or all items. Double-clicking a breakpoint takes you to that line of code.

The Breakpoints tab is discussed further on the Breakpoints page.



The Threads Tab



Attach:threads.png Δ



The Threads tab contains a list of currently running threads. In a multi-thread app, you can double-click on a thread to make it active.



The Memory Tab



Attach:memory1.png Δ | The Memory tab showing the raw contents of a unicode-build wxString


 Attach:memory2.png Δ | The Memory tab showing the contents of an int (n was 2)



The Memory tab provides a way to view directly the contents of a memory address. You can enter this explicitly (e.g. 0x12345678) or let gdb work it out for you (e.g. &n). The Size field determines how many bytes of memory should be displayed.


Edit - History - Print - Recent Changes - Search
Page last modified on November 16, 2009, at 07:14 PM