PATCH: No reposition editor after add watch

Discussion about CodeLite development process and patches
foxmuldr
CodeLite Expert
Posts: 120
Joined: Sun May 10, 2009 6:56 am
Contact:

PATCH: No reposition editor after add watch

Post by foxmuldr »

Per bug 3059778 reported by me on SourceForge CodeLite bug tracker, patch offered.
You do not have the required permissions to view the files attached to this post.
Best regards,
Rick C. Hodgin
www.Visual-FreePro.org
www.LibSF.org
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: PATCH: No reposition editor after add watch

Post by eranif »

Applied

Eran
Make sure you have read the HOW TO POST thread
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: PATCH: No reposition editor after add watch

Post by eranif »

I found a regression using this patch:
If I start a new debug sessions while I already have 'watches' from the previous debug session, codelite does not show the green arrow. I have to manually click on the 'Show Current Line' button in the debugger tool.
Until this is fixed, I am changed this code:

Code: Select all

UpdateFileLine(event.m_file, event.m_line, ManagerST::Get()->GetRepositionEditor());
into this:

Code: Select all

UpdateFileLine(event.m_file, event.m_line, true);
Eran
Make sure you have read the HOW TO POST thread
foxmuldr
CodeLite Expert
Posts: 120
Joined: Sun May 10, 2009 6:56 am
Contact:

Re: PATCH: No reposition editor after add watch

Post by foxmuldr »

eranif wrote:I found a regression using this patch:
If I start a new debug sessions while I already have 'watches' from the previous debug session, codelite does not show the green arrow. I have to manually click on the 'Show Current Line' button in the debugger tool.
Could the system be setup to raise a flag when the debugger starts called "m_debuggerHasRestarted" and a count called "m_debuggerCallbacks" indicating how many times it's been "activated" through an error or through a user stepping since the start of the debugger session? That way it could be tested the first time RefreshValues() is called and always force the refresh. It may also provide interesting / useful statistics (debugger cycles, debugger up-time, efficiency, etc.).

Also, on my install (Ubuntu 10.04 Linux), CodeLite doesn't update the green arrow ever until it reaches a breakpoint or an error. And in my version, it is always updating the display when that happens and I never have to click the "show current line" button. How are you using the debugger to have it not show the green arrow?

In the alternative, here's a patch which only calls RefreshValues(false) from OnNewWatch() and OnDisplayFormat(), and from cl_editor.cpp when the user right-clicks or selects the menu to add a watch. Everywhere else uses the default/old RefreshValues() functionality, which forces the full editor position refresh.

- Rick
You do not have the required permissions to view the files attached to this post.
Best regards,
Rick C. Hodgin
www.Visual-FreePro.org
www.LibSF.org
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: PATCH: No reposition editor after add watch

Post by eranif »

foxmuldr wrote:Could the system be setup to raise a flag when the debugger starts called "m_debuggerHasRestarted" and a count called "m_debuggerCallbacks" indicating how many times it's been "activated" through an error or through a user stepping since the start of the debugger session? That way it could be tested the first time RefreshValues() is called and always force the refresh. It may also provide interesting / useful statistics (debugger cycles, debugger up-time, efficiency, etc.).
The interaction with the debugger is done in an async mode. A counter can be added, but I'd rather use it only for statistics.
The order of the replies is not guaranteed.
foxmuldr wrote:In the alternative, here's a patch which only calls RefreshValues(false) from OnNewWatch() and OnDisplayFormat(), and from cl_editor.cpp when the user right-clicks or selects the menu to add a watch. Everywhere else uses the default/old RefreshValues() functionality, which forces the full editor position refresh.
This sounds like a better alternative, I will give it a try

Eran
Make sure you have read the HOW TO POST thread
foxmuldr
CodeLite Expert
Posts: 120
Joined: Sun May 10, 2009 6:56 am
Contact:

Re: PATCH: No reposition editor after add watch

Post by foxmuldr »

eranif wrote:This sounds like a better alternative, I will give it a try
Was this patch ever applied?
Best regards,
Rick C. Hodgin
www.Visual-FreePro.org
www.LibSF.org
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: PATCH: No reposition editor after add watch

Post by eranif »

foxmuldr wrote:Was this patch ever applied?
the original patch yes, the latest one: not yet. I will apply it on my local copy and test it as soon as I find some spare time

Eran
Make sure you have read the HOW TO POST thread
Post Reply