Bug 52131 - Documentation for Watch/Inspect/Display is minimalistic
Summary: Documentation for Watch/Inspect/Display is minimalistic
Status: REOPENED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-16 04:57 EST by Felix Pahl CLA
Modified: 2010-07-19 04:28 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Pahl CLA 2004-02-16 04:57:49 EST
The documentation should compare and contrast
Watch, Inspect and Display. It took me a while to
figure out that Inspect inspects certain objects,
whereas Watch watches certain variables. (If I'm
wrong about that, it just underscores the need for
an explanation :-) The difference isn't obvious
since it only becomes relevant once you leave the
stack frame from which you performed Inspect or
Watch, and it isn't indicated in the view. (I'll
submit the latter as a separate feature request.)

The difference between these two and Display is
a little more obvious but should also be explained
in the documentation. 

The explanation of Display (at least the one you
find if you enter "Display" in the help search field)
is minimalistic and reminiscent of MS help files:
"You can type an expression in the Display view and
then use the Display command to display its value."
It should mention how expression values are converted
to strings (toString()? detail formatters? special cases
for arrays?)

I couldn't find anything about Watch expect brief entries
in "New features" sections.
Comment 1 Felix Pahl CLA 2004-02-16 05:07:26 EST
Sorry, I take that back -- of course Watch and Inspect have
different icons in the Expressions view -- but my suggestion
that the difference be explained in the documentation stands.
Comment 2 Dani Megert CLA 2010-06-04 04:39:52 EDT
As of 3.6 RC4 the doc looks good to me. Please reopen if you still miss something.
Comment 3 Felix Pahl CLA 2010-06-04 06:53:06 EDT
The doc has certainly made great strides since I opened this bug, but most of the problems I was reporting persist.

After spending several minutes searching the help in various ways, I haven't found anything that clearly explains the difference between Watch and Inspect. If I search for "watch" and "inspect", I only find brief pages (entitled "Add Watch Expression" and "Inspect Selected Variable", respectively)  that explain that I can "create a new watch expression and add it to the Expressions View" and "create an inspect expression associated with the selected variable and add it to the Expressions View", respectively.They both link to a page entitled "Expressions View", which offers a bit more information but likewise uses the terms "watch expression" and "inspect expression" as if they had already been defined, but I couldn't find them defined or explained anywhere. These terms should link to pages called "Inspect expression" and "Watch expression" that define these terms (and link to each other under "Related concepts"). However, the term "inspect expression" is actually a bit misleading. You can inspect an expression, but the result isn't really an "inspect expression", it's a *value* that is then displayed -- though the display may change if the value is an object reference, there is no longer an expression involved at this stage.

Also, I still couldn't find anything about how expression values are converted to strings for "Display" (toString()? detail formatters? special cases for arrays?).

P.S.: After searching some more I found a page called "Expressions" that contains the sentence "A watch expression is an expression that is repeatedly evaluated as the program executes." This has the form of a definition of a watch expression, but a) it's in the Programmer's Guide, not the user guide, and talks about IExpression etc., and b) it doesn't really clarify the difference between a "watch expression" and an "inspect expression". What's slightly confusing about this difference is that both show changing things in the expressions view, but what the "watch expression" shows changes because the expression gets reevaluated, whereas what the "inspect expression" shows changes only if the result of the expression was an object reference and the object changes. This is straightforward once you figure it out, but it's not trivial to figure out without an explanation.

Two related things I noticed while writing this that may or may not warrant opening a separate bug:

-- There are help pages called "Inspect Selected Variable" and "Inspect Selected Statement". These both appear to be misnomers, since it's not statements but expressions that are inspected, and a variable is just a special case of an expression, so it seems there should be only one of these pages and it should be called "Inspect Selected Expression".

-- The page "Display View" appears to be out of date; e.g. there's an entry "Inspect Result", but in my menu the entry is called just "Inspect".
Comment 4 Felix Pahl CLA 2010-06-04 06:59:35 EDT
Sorry, I forgot to compare versions -- I'm using Version: 3.4.1, Build id: M20080911-1700 -- I'll look at 3.6 RC4 as soon as I get a chance.
Comment 5 Felix Pahl CLA 2010-07-18 20:45:52 EDT
I've now downloaded Eclipse 3.6.0, Build id: I20100608-0911, and found that what I wrote in comment 3 applies to this version as well.
Comment 6 Dani Megert CLA 2010-07-19 04:28:53 EDT
OK, thanks for checking. Moving to Debug to improve the doc.