Author Topic: CLang CC Plugin: Do not show (or move) popup when debugging  (Read 3147 times)

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
CLang CC Plugin: Do not show (or move) popup when debugging
« on: February 19, 2023, 11:34:30 pm »
Hi,
i like the new CC plugin a lot, just one thing that botters ma a lot:
When debugging a program and the "show variable under cursor" setting is enabled, the popup of cc does override the debugger popup, so it is not usefull anymore.
I tried to add a setting to disable the popup while debugging, but i am not really successfull... Any ideas how this could be implemented?

A premium solution would of course be to move the cc popup to a place where the debugger popup is not visible, to have both popups... Or give the debugger popup priority...

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: CLang CC Plugin: Do not show (or move) popup when debugging
« Reply #1 on: February 20, 2023, 07:02:13 am »
Hi,
i like the new CC plugin a lot, just one thing that botters ma a lot:
When debugging a program and the "show variable under cursor" setting is enabled, the popup of cc does override the debugger popup, so it is not usefull anymore.
I tried to add a setting to disable the popup while debugging, but i am not really successfull... Any ideas how this could be implemented?

A premium solution would of course be to move the cc popup to a place where the debugger popup is not visible, to have both popups... Or give the debugger popup priority...

Please provide a set of steps to reproduce this problem.
Thanks

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: CLang CC Plugin: Do not show (or move) popup when debugging
« Reply #2 on: February 20, 2023, 12:13:12 pm »
THe original plugin had the same problem, IMHO CC tooltips should be disabled while debugging.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: CLang CC Plugin: Do not show (or move) popup when debugging
« Reply #3 on: February 20, 2023, 09:35:18 pm »
1) tick in  Settings->GDB/CDB debugger->Default->Evaluate expression under cursor
2) Create a project with this source for example:
Code
#include <iostream>

using namespace std;


struct test {

    int a;
    double b;

};


int main()
{
    cout << "Hello world!" << endl;

    test t;

    t.a = 1;
    t.b = 1.1;

    cout << t.a << endl << t.b << endl;

    return 0;
}
3) place a breakpoint in the line before return.
4) Start debugging
5) Hover with the mouse over one t element
6) The popup of cc and dbg will kick in an overriede each other.
With this example it is quite hard to reproduce, because cc is probably to fast. I have attached a screenshot for example.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: CLang CC Plugin: Do not show (or move) popup when debugging
« Reply #4 on: February 21, 2023, 02:55:26 am »
We have discussed this issue many years ago in our forum, but at that time, we don't have solutions.

My idea is that we can put the two tips(either from CC or from Debugger) in the two places. Because when debugging, I still need CC information. Maybe, a fixed panel to show the CC tips when debugging.  :)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: CLang CC Plugin: Do not show (or move) popup when debugging
« Reply #5 on: February 21, 2023, 05:24:04 pm »
We have discussed this issue many years ago in our forum, but at that time, we don't have solutions.

My idea is that we can put the two tips(either from CC or from Debugger) in the two places. Because when debugging, I still need CC information. Maybe, a fixed panel to show the CC tips when debugging.  :)

If you set the settings>debugger>common>"Require Control key to evaluate expression" , the documentation popup is replaced by the expression evaluation when you hit the control key.

If you hold the control key before placing the mouse on the word to be evaluated, the documentation window never pops up but the evaluation window does.

You get the best of both worlds.
Someone in the past must have figured this out because it's been that way for as long as I can remember.
« Last Edit: February 21, 2023, 05:39:10 pm by Pecan »