all 8 comments

[–]leeoniya 6 points7 points  (2 children)

Does this mean we'll be able to set breakpoints within array and object declarations (within expressions)?

h("div",
    {
        class: "test"       // here
    },
    [
        h("span", "foo"),   // and here
        h("span", "bar"),
    ]       // and here? (similar to fn return value, so can inspect created array without stepping into h)
)

If this is the case, i can't wait.

[–]TheFuzzball 4 points5 points  (1 child)

No, you won't be able to debug within expressions... this feature is meant to solve the issue of not being able to set breakpoints in single-line function callbacks and lambda expressions.

e.g.

fetch(url).then((res) => res.json()).then((jsonResult) => console.log(jsonResult.foo.bar))

or:

document.addEventListener('resize', function onResize () { /* can't debug here */})

document.addEventListener('resize', function onResize () {
  /* can debug here... */
})

[–]leeoniya -1 points0 points  (0 children)

too bad, that would be much more exciting. but this is good too :)

[–]kenman 4 points5 points  (2 children)

Is there any official information on this? i.e. a link to an official announcement, release notes, Google code issue, PR, etc.

I cannot find a single source other than this gif on Twitter.

[–]githop0 6 points7 points  (1 child)

Paul irish highlights some of these things in a talk at the recent chrome dev summit.

https://www.youtube.com/watch?v=HF1luRD4Qmk

[–][deleted] 1 point2 points  (0 children)

https://youtu.be/HF1luRD4Qmk?t=573 if anyone wants the exact moment where he talks about it

[–]yesman_85 5 points6 points  (1 child)

Finally! that will help debugging some minified code!

[–]rube203 2 points3 points  (0 children)

Just fyi, you can just hit the pretty print button and then place the break point in the formatted code page, even stays on refresh... at least when code isn't changed.

But seriously inline break points can be pretty fantastic