@v8js @bmeurer @mathias - Is their some reason why Chrome Dev tools can't access the outer scope. Seems like it should still be in scope.pic.twitter.com/qKkPzjeoyw
Za najbolje sučelje na Twitteru koristite Microsoft Edge ili instalirajte aplikaciju Twitter iz trgovine Microsoft Store.
DevOps, SecOps, Author, Speaker, Father, and general nice guy.
U tweetove putem weba ili aplikacija drugih proizvođača možete dodati podatke o lokaciji, kao što su grad ili točna lokacija. Povijest lokacija tweetova uvijek možete izbrisati. Saznajte više
Dodajte ovaj Tweet na svoje web-mjesto kopiranjem koda u nastavku. Saznajte više
Dodajte ovaj videozapis na svoje web-mjesto kopiranjem koda u nastavku. Saznajte više
Integracijom Twitterova sadržaja u svoje web-mjesto ili aplikaciju prihvaćate Twitterov Ugovor za programere i Pravila za programere.
| Država | Kod | Samo za korisnike |
|---|---|---|
| Sjedinjene Američke Države | 40404 | (bilo koje) |
| Kanada | 21212 | (bilo koje) |
| Ujedinjeno Kraljevstvo | 86444 | Vodafone, Orange, 3, O2 |
| Brazil | 40404 | Nextel, TIM |
| Haiti | 40404 | Digicel, Voila |
| Irska | 51210 | Vodafone, O2 |
| Indija | 53000 | Bharti Airtel, Videocon, Reliance |
| Indonezija | 89887 | AXIS, 3, Telkomsel, Indosat, XL Axiata |
| Italija | 4880804 | Wind |
| 3424486444 | Vodafone | |
| » Pogledajte SMS kratke šifre za druge zemlje | ||
Vremenska crta mjesto je na kojem ćete provesti najviše vremena i bez odgode dobivati novosti o svemu što vam je važno.
Prijeđite pokazivačem preko slike profila pa kliknite gumb Pratim da biste prestali pratiti neki račun.
Kada vidite Tweet koji volite, dodirnite srce – to osobi koja ga je napisala daje do znanja da vam se sviđa.
Najbolji je način da podijelite nečiji Tweet s osobama koje vas prate prosljeđivanje. Dodirnite ikonu da biste smjesta poslali.
Pomoću odgovora dodajte sve što mislite o nekom tweetu. Pronađite temu koja vam je važna i uključite se.
Bez odgode pogledajte o čemu ljudi razgovaraju.
Pratite više računa da biste dobivali novosti o temama do kojih vam je stalo.
Bez odgode pogledajte najnovije razgovore o bilo kojoj temi.
Bez odgode pratite kako se razvijaju događaji koje pratite.
@v8js @bmeurer @mathias - Is their some reason why Chrome Dev tools can't access the outer scope. Seems like it should still be in scope.pic.twitter.com/qKkPzjeoyw
Simple code is: function bodyOnLoad() { const outerValue = 'ipsum'; function inner() { var innerVaue = 'test test'; debugger; } inner(); }
The @v8js engine optimizes away the `outerValue` from the closure for `inner`, since it's no needed. So @ChromeDevTools has no way to get to its value.
initially that was my idea, but it still wasn't available in the inner, when it is used after it. function onLoad() { const oValue = 'ipsum'; function inner() { var innerVaue = 'test test'; debugger; } inner(); console.log(Value); }
Lol, last line should be `console.log(oValue);` so shouldn't oValue still be available since it has to be used AFTER inner() is called?
cc @tverwaes
No, oValue is referenced from the function itself so is still not context allocated. Only gets context allocated if an inner function references it (or if there's an eval).
Seems strange to me that oValue is not known by the debugger at that point since it is still allocated; and in the parent scope. This creates a bit of debugging pain when you are dealing with Lamda's and things like .map, .reduce, etc.
The v8 engine knows what the value is; but the debugger doesn't. In this example; eval got the value and returned it -- but while in inner() the debugger still has no clue.pic.twitter.com/CXsF46Uuen
So would this be something you think a feature request to enhance the tooling to change it to work the way a developer would assume it would work. (i.e. child scopes can see parent scope values, just like code can. )
In general this doesn't work ("onLoad" can finish and destroy "oValue" before "inner" is called), but I agree that it may make sense to provide access to values when they are still available; especially for .map etc. @hashseed
Pro-tip: if the function is still on the stack, select the stack frame to see the stack locals.pic.twitter.com/yiBARGCUZ7
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.