Bug 202439 - Cannot change value at expressions view
Summary: Cannot change value at expressions view
Status: REOPENED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P2 minor (vote)
Target Milestone: ---   Edit
Assignee: PHP Debug CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-06 09:24 EDT by Toshihiro Izumi CLA
Modified: 2020-05-14 10:16 EDT (History)
6 users (show)

See Also:


Attachments
patch (1.16 KB, patch)
2010-11-04 01:43 EDT, xu jiaxi CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toshihiro Izumi CLA 2007-09-06 09:24:19 EDT
'Change Value' on a variable in Expressions view causes nothing (in case of ZendDebugger).

1. Create following PHP code.
<?php
$obj = array(1,2,array("a","b","c"));
var_dump($obj);
?>
2. Debug as PHP Web Page with Zend + Break at First Line
3. Select "$obj" and add watch.(rightclick->watch, show view->Expressions)
4. Do StepOver. $obj appears in Expressions view.
5. Change value $obj[0] ((int) 1) for example. The value won't be changed.
6. Change value $obj[2][0] ((string:1) a) for example. The value won't be changed and value pane shows wrong(entered) value.

In case of Xdebug, 'Change Value' causes error message-box. It says
>Setting the value failed.
>
>Reason:
> program under debug rejected value change
Comment 1 David Kelsey CLA 2007-09-27 15:58:11 EDT
For xdebug, it would seem that xdebug refused the request to change the value from PDT. So this might be a feature of xdebug rather than a bug in PDT.
Comment 2 Toshihiro Izumi CLA 2007-09-28 00:24:46 EDT
DBGpVariable in Expressions View doesn't have fullname value even if it is a php variable.
Comment 3 David Kelsey CLA 2007-10-16 12:36:29 EDT
For xdebug, I have disabled the ability to change a value in an expression. It would only make sense if you were watching just a variable. The facility to change variable contents is available from the variables pane.

This however doesn't apply to the zend debugger.
Comment 4 David Kelsey CLA 2008-03-20 11:34:03 EDT
Addressed in XDebug
Comment 5 Gadi Goldbarg CLA 2008-04-17 15:34:45 EDT
Same goes for the Zend debugger ,but  we need to add a relevant message OR 
disable this action.
Comment 6 Gadi Goldbarg CLA 2008-12-02 10:24:47 EST
Reproducible in PDT 2.0.0 as well using ZendDebugger
Tested on Wix XP
Eclipse SDK
Version: 3.4.1
Build id: M20080911-1700
debugger - org.zend.php.debug_feature-I20081127
pdt - N20081201
dltk-core-sdk-I-I200811251145-200811251145-incubation

[Kalin Yanev kalin.a@zend.com]
Comment 7 Michael Spector CLA 2009-06-07 07:27:53 EDT
Can't re-create.
I go to Variables View, change value of $obj[0], press F8 - and I see new value in the Debug Output View.
Comment 8 Vadim Punski CLA 2009-12-30 04:27:35 EST
The value changed after F6 pressed. 
There is no changed after pressing OK on "Change Value" window.
Still relevant.
Reopening, moving to 2.2.0M1
Comment 9 xu jiaxi CLA 2010-11-04 01:43:10 EDT
Created attachment 182349 [details]
patch

This patch can fix it in "Variables" view.
But in "Expressions" view, I find it also can't refresh the value when I change it in JDT.
So I think it's a bug of platform.