Ticket #1412 (closed enhancement: fixed)
Evaluate Expression in the debugger
| Reported by: | szabgab | Owned by: | bowtie |
|---|---|---|---|
| Priority: | trivial | Milestone: | |
| Component: | Debugger for Perl 5 | Version: | 0.94 |
| Keywords: | Cc: |
Description
The p|x is button is basically evaluating an arbitrary expression and displaying it.
IMHO if there is a selection in the editor it should default to evaluate that expression so I can easily check the value of a variable by highlighting it and clicking on p|x.
Currently if the expression is $something it uses 'p' and if it is @something it uses 'x'. This isn't good if $something is already a reference. Probably this should behave in a clever way and first check if $something is a reference or not. If it is a reference it should use x.
Probably it should also be renamed to "Evaluate expression" and have a nice icon. The mouse-over explanation can be extended to explain the way it behaves.
Change History
comment:1 Changed 15 months ago by bowtie
- Priority changed from major to minor
- Status changed from new to assigned
comment:2 Changed 15 months ago by bowtie
Debug2 has not got a Scooby-Doo as to whether $var_name is a var or a ref.
It's just a string prefixed with $.
I suggest that you just enable y=0 and click on the variable you wish to view
which will be displayed in it's corresponding colour in Debug-Output
correct as of Padre 0.95
comment:3 Changed 15 months ago by bowtie
- Priority changed from minor to trivial
if $string = one and $string_ref = \$string
p|x
if you enter '$string_ref' you will get
$string_ref = SCALAR(0xa0e6680)
then I suggest that you enter '${$string_ref}'
${$string_ref} = one
or
x $string_ref and click <Raw>
as for p|x it dose what it say's in wiki

At present
and it needs to be chained to
As for p|x -> icon ( "Evaluate expression" ) is cool, plus tool tip