Breakpoint on line with array destructuring stops too late
Reported by
roblour...@gmail.com,
Nov 8 2017
|
|
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
Steps to reproduce the problem:
Have code like this:
```
const foo = {
func: () => {
console.log('in func');
return [1, 2];
}
}
console.log('before');
let [a, b] = foo.func();
console.log('after');
```
- Set a breakpoint on the `let [a, b]` line.
- Trigger the code, pause on the breakpoint
- Step in
What is the expected behavior?
It should pause before foo.func() has been invoked, and 'step in' should step into that function
What went wrong?
- When the breakpoint is hit, 'in func' has already been logged, indicating that the BP stopped after foo.func() ran, but before the destructuring assignment
- 'step in' - the instruction pointer goes to the next line
Did this work before? N/A
Chrome version: 61.0.3163.100 Channel: n/a
OS Version: OS X 10.12.6
Flash Version:
A dotted expression like foo.func is also necessary for this. Strangely, it doesn't repro if I just call a function like func().
,
Sep 12
Thanks but that is counterintuitive, and difficult to implement for vscode where a breakpoint on the "line" should sort of just do whatever is right. I still consider this a bug on node/chrome's end. |
|
►
Sign in to add a comment |
|
Comment 1 by kozy@chromium.org
, Nov 8 2017Owner: kozy@chromium.org
Status: Assigned (was: Unconfirmed)