NEW DATE! Bugzilla will undergo maintenance 2024-03-28 18h00 CET. Bugzilla will be placed in read-only mode at that time.

Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 409779 - Setting Toggle Watchpoint does not work
Summary: Setting Toggle Watchpoint does not work
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 8.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-debug-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on: 246649
Blocks: 390641
  Show dependency tree
 
Reported: 2013-06-03 15:16 EDT by Alvaro Sanchez-Leon CLA
Modified: 2020-09-04 15:21 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alvaro Sanchez-Leon CLA 2013-06-03 15:16:19 EDT
The "Toggle Watchpoint" option from the Run menu remains disabled, 
this happens at the location of the definition as well as within the program logic.

The work around is to define them via the Breakpoints view (i.e. Drop down menu - Add Watch point (C/C++))
Comment 1 Marc-André Laperle CLA 2013-07-13 23:46:41 EDT
It would be nice to fix this because this is how it is explained in the help and I had to resort to searching bugzilla to figure out how to add a watchpoint ;)

For your information, the first thing I looked for was a dedicated button (ToolItem/SWT.DROP_DOWN) in the Breakpoints view toolbar, such as "New" or "Add" then select what kind of breakpoint. Right now, it's all in the view drop-down menu which seems inconsistent with other views in Eclipse because this menu is used to configure how the view displays it's content (layout, filter, etc) which is why I never tried that.
Comment 2 Teodor Madan CLA 2013-07-16 10:23:37 EDT
This is related to Bug 246649. RetargetWatchpointAction is called for checking action enable state only on IStructuredSelection event not on text selection changes. 

The background is that when first time editor is activated, most likely selection is not on a variable but somewhere in a method. Hence it will be disabled. When you move cursor to a variable (aka text selection change event), action enable logic is not called any more. 

This does affect other actions based on RetargetAction  as well, such as "Move To Line", "Run to Line" that will be active for non method lines. Including for Java JDT "Toggle Watchpoint".

An workaround: after selecting the text with variable switch active parts to a different view/editor and back. This will enable "Toggle Watchpoint"