New issue
Advanced search Search tips

Issue 789241 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 771738
Owner:
Closed: Oct 4
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Changing a local variable on break-point is not evaluated in the next in the next step over

Reported by amir.i.m...@gmail.com, Nov 28 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36

Steps to reproduce the problem:
1. Stop on a certain breakpoint in ts file, where the next line will be some if condition.
For example:
result = "TEST";
if (result) {
 newResult = true;
}
else {
newResult = false;
}
2. In console - change the local variable to null or undefined value.
3. press F10 for step over.

What is the expected behavior?
After the variable value which i changed during debug, the expected behavior is that it should go to the ELSE block.

What went wrong?
It's still going inside the IF block since the new value change wasn't evaluated\updated. The if condition still considers the previous value of the variable which is - "TEST".

Did this work before? N/A 

Chrome version: 62.0.3202.94  Channel: stable
OS Version: 6.1
Flash Version:
 
Owner: kozyatinskiy@chromium.org
Status: Assigned (was: Unconfirmed)
Yes. In the previous chrome versions i've had it has been always worked fine (the prev version i had was 56 for instance).
It seems that for some reason if i change a variable during debugging the change won't affect the debugged code.
Maybe there isn't a trigger which will re-evaluate the scope after local variable changed, and therefore when i continue to the next line, the condition will refer to the original value (and not the NEW updated valued i set in the console).

Comment 3 Deleted

Comment 4 Deleted

Important update: 
1. It seems that it also reproducing not only onTypescript file and but also at native JS file .
2. I've uploaded html + js file which can demonstrate the issue. In order to reproduce it:
 at the myFunction at the js file, you need to break at "if(test)" , change the 'test' variable to NULL or undefined, and do the next step -> you'll see that the if condition was entered the 'true' block instead going to the 'else' block.

Waiting for your feedback, thanks.

AmirT


index.html
185 bytes View Download
myScript.js
197 bytes View Download
Reproduced on 64.0.3280.0 (Official Build) canary (64-bit) Mac OS X

Note that I ran the code from Amir's JS Fiddle example: http://jsfiddle.net/Bnuy7/2582/


Comment 7 by kozy@chromium.org, Nov 30 2017

Owner: kozy@chromium.org
Hey? Any updated on this issue ?
Would like to verify if this issue was fixed and if so in which version?

Thanks
Mergedinto: 771738
Status: Duplicate (was: Assigned)

Sign in to add a comment