Bug 58800

Summary: Allow expressions from breakpoint context in the Print Text field of breakpoint customizer.
Product: debugger Reporter: _ sandipchitale <sandipchitale>
Component: CodeAssignee: issues <issues.netbeans.org>
Status: CLOSED WORKSFORME QA Contact: issues <issues.netbeans.org>
Priority: P3    
Version: 5.x   
Target Milestone: TBD   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Report:

Description _ sandipchitale 2005-05-11 18:48:14 UTC
An alternative to this could be to allow void expressions like:

System.out.prinln(<some expression from breakpoints context>)

in the breakpoint condition field. Treat void as false. Thus the breakpoint 
behaves like a trace.
Comment 1 Roman Ondruska 2005-05-13 10:13:58 UTC
Not sure what you mean. In current version it is possible to add an expression
to breakpoint "Print Text", e.g.:

{=a[10] + b}

Let me know whether this is answer to your RFE. Thanks!
Comment 2 _ sandipchitale 2005-05-13 14:59:42 UTC
I only see the following in the Print Text:

Breakpoint hit at line {lineNumber} in class {className} by thread 

All of {lineNumber}, {className} and {threadName} looked like some special 
tokens provided by the debugger and not expressions from user program. That is 
why I did not think it was possible to add expresseions using variables, 
parameters and fields of breakpoint context in the user's program.

May be a label or a tooltip could be added to tell the user that they can add 
any expression using variables, parameters and fields of breakpoint context.

Can you please explain the syntax:

{=a[10] + b}

Won't the tokens - {lineNumber}, {className} and {threadName} conflict with 
the user's variable, parameter or fiedl names?

Or is the '{...}' vs '{=...}' syntax distiguishes those? I better go an 

Comment 3 Roman Ondruska 2005-05-13 15:04:31 UTC
Syntax is like {=EXPRESSION}

where EXPRESSION is expression to be evaluate ;-) 
Comment 4 _ sandipchitale 2005-05-13 15:23:44 UTC
1. I could not find the info about {=EXPRESSION} in the Online Help. How will 
the user's discover the functionality?

2. What other special tokens similar to {lineNumber}, {className} and 
{threadName} are available?
Comment 5 Roman Ondruska 2005-05-16 09:39:52 UTC
There are following tokens available:


We will check the documentation, thanks for info.
Comment 6 Quality Engineering 2010-04-29 09:22:39 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo