User forums > General (but related to Code::Blocks)

show debugger tip under curser when ctrl key is pressed

<< < (5/8) > >>

MortenMacFly:

--- Quote from: MaxGaspa on December 22, 2010, 09:17:44 am ---Try to put the cursor, may be as an involuntary action due to mouse moving,  over a std::vector<double> of 50000 elements ...wait and good luck!

--- End quote ---
I see your point, but again: I don't believe the default case is users having std::vector<double> of 50000 elements. So an option for those who have which can be toggled easily via a toolbar is the way to go IMHO.

oBFusCATed:
Morten: The problem is if you hover your mouse on an uninitialized vector. Then the size is not 50000, but uint_t(-1) or something that large.

Ollydbg: I'll add an item to my TODO: add a option to disable the gdb_types.script

ollydbg:

--- Quote from: oBFusCATed on December 22, 2010, 12:33:16 pm ---Morten: The problem is if you hover your mouse on an uninitialized vector. Then the size is not 50000, but uint_t(-1) or something that large.

Ollydbg: I'll add an item to my TODO: add a option to disable the gdb_types.script


--- End quote ---

thank you obf!!!

ollydbg:
@all

Just a reminder, I just noticed that Codelite has an enhanced feature. see the log


--- Quote ---- Debugger: when the option to show the debugger tip only if CTRL key is down is ON, the tip will now be shown immediately without the need to "move" the mouse

-------------------------------
M : /trunk/LiteEditor/cl_editor.cpp 
M : /trunk/LiteEditor/context_cpp.cpp

--- End quote ---

In-fact, I'm trying to implement this feature several days ago. (by hacking the scintilla source code, but failed).

So, eranif has done a great job!!!! thanks.

ollydbg:
another question is:

How can this be done in Codeblocks:
The codelite's code is like below:

--- Code: ---
void LEditor::OnKeyDown(wxKeyEvent &event)
{
// Hide tooltip dialog if its ON
IDebugger *   dbgr                = DebuggerMgr::Get().GetActiveDebugger();
bool          dbgTipIsShown       = ManagerST::Get()->GetDebuggerTip()->IsShown();
bool          keyIsControl        = event.GetKeyCode() == WXK_CONTROL;

if(dbgTipIsShown && !keyIsControl) {

// If any key is pressed, but the CONTROL key hide the
// debugger tip
ManagerST::Get()->GetDebuggerTip()->HideDialog();

} else if(dbgr && dbgr->IsRunning() && ManagerST::Get()->DbgCanInteract() && keyIsControl) {

DebuggerInformation info;
DebuggerMgr::Get().GetDebuggerInformation(dbgr->GetName(), info);

if(info.showTooltipsOnlyWithControlKeyIsDown) {
// CONTROL Key + Debugger is running and interactive
// and no debugger tip is shown -> emulate "Dwell" event
wxScintillaEvent sciEvent;
wxPoint pt ( ScreenToClient(wxGetMousePosition()) );
sciEvent.SetPosition( PositionFromPointClose(pt.x, pt.y));

m_context->OnDbgDwellStart(sciEvent);
}
}
...

--- End code ---

Any one can help me???

thanks.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version