User forums > General (but related to Code::Blocks)
show debugger tip under curser when ctrl key is pressed
ollydbg:
--- Quote from: jens on December 20, 2010, 10:16:03 am ---Works here on windows7.
--- End quote ---
thanks.
can someone tested on win xp???
thanks.
MortenMacFly:
--- Quote from: ollydbg on December 20, 2010, 10:56:21 am ---can someone tested on win xp???
--- End quote ---
Works here.
ollydbg:
--- Quote from: MortenMacFly on December 20, 2010, 12:58:54 pm ---
--- Quote from: ollydbg on December 20, 2010, 10:56:21 am ---can someone tested on win xp???
--- End quote ---
Works here.
--- End quote ---
which wx version did you use?
I use 2.8.11.
did you directly apply my patch? (with out other patch)
I have tested in two PCs, but both the tooltip will disappear quickly. :( :(
what's wrong with my PC???? :(
ollydbg:
@Jens and Morten
I have solved the problem, see the patch:
--- Code: ---Index: plugins/debuggergdb/debuggergdb.cpp
===================================================================
--- plugins/debuggergdb/debuggergdb.cpp (revision 6903)
+++ plugins/debuggergdb/debuggergdb.cpp (working copy)
@@ -2648,6 +2648,9 @@
if (!Manager::Get()->GetConfigManager(_T("debugger"))->ReadBool(_T("eval_tooltip"), false))
return;
+ if (!::wxGetKeyState(WXK_CONTROL)) // does not work!!!!!
+ return;
+
EditorBase* base = event.GetEditor();
cbEditor* ed = base && base->IsBuiltinEditor() ? static_cast<cbEditor*>(base) : 0;
if (!ed)
Index: plugins/debuggergdb/gdb_tipwindow.cpp
===================================================================
--- plugins/debuggergdb/gdb_tipwindow.cpp (revision 6903)
+++ plugins/debuggergdb/gdb_tipwindow.cpp (working copy)
@@ -222,9 +222,10 @@
Close();
}
-void GDBTipWindow::OnKey(wxKeyEvent& /*event*/)
+void GDBTipWindow::OnKey(wxKeyEvent& event)
{
- Close();
+ if(!event.ControlDown())
+ Close();
// not using event.Skip() here to save us from a bad crash...
}
Index: sdk/wxscintilla/src/scintilla/src/Editor.cxx
===================================================================
--- sdk/wxscintilla/src/scintilla/src/Editor.cxx (revision 6903)
+++ sdk/wxscintilla/src/scintilla/src/Editor.cxx (working copy)
@@ -5379,7 +5379,10 @@
}
int Editor::KeyDown(int key, bool shift, bool ctrl, bool alt, bool *consumed) {
- DwellEnd(false);
+
+ if (!ctrl)
+ DwellEnd(false);
+
int modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) |
(alt ? SCI_ALT : 0);
int msg = kmap.Find(key, modifiers);
--- End code ---
I need the filter out the control key event on the GDB tip window. I'm really strange why both of your system works correctly with my last patch?? any ideas??
BTW:
From the codelite's change log, eranif has use this feature for debugger:
--- Quote ---rev 4672 of Codelite trunk
- New: debugger tooltip is now enabled only if CTRL key is down (configurable via the debugger settings page)
- Updated various scripts to set the new codelite version to 2.9.0
-------------------------------
M : /trunk/InnoSetup/make_packages.bat
M : /trunk/Interfaces/debugger.h
M : /trunk/LiteEditor/app.cpp
M : /trunk/LiteEditor/cl_editor.cpp
M : /trunk/LiteEditor/context_cpp.cpp
M : /trunk/LiteEditor/debuggersettingsbasedlg.cpp
M : /trunk/LiteEditor/debuggersettingsbasedlg.h
M : /trunk/LiteEditor/debuggersettingsdlg.cpp
M : /trunk/LiteEditor/frame.cpp
M : /trunk/LiteEditor/manager.cpp
M : /trunk/Runtime/config/debuggers.xml.default
M : /trunk/Runtime/config/debuggers.xml.gtk
M : /trunk/formbuilder/DebuggerSettings.fbp
M : /trunk/make_deb.sh
M : /trunk/make_src_targz.sh
M : /trunk/sdk/wxscintilla/src/scintilla/src/Editor.cxx
--- End quote ---
Do we need to implement this feature???
ollydbg:
for those want to show the debug information correctly. see like below:
You need to delete(comment out) the code snippet in gdb_types.script (because python pretty printer works better than the old implementation and has more wx and c++ container type support)
more reference can be found in this post:
http://forums.codeblocks.org/index.php/topic,12747.0.html
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version