Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Debugger Statementについて
Search
Taketoshi Aono(青野健利 a.k.a brn)
March 20, 2018
Programming
1
530
Debugger Statementについて
Debugger Statementの紹介と使い方
proposal-debugger-operandsについて
Taketoshi Aono(青野健利 a.k.a brn)
March 20, 2018
Tweet
Share
More Decks by Taketoshi Aono(青野健利 a.k.a brn)
See All by Taketoshi Aono(青野健利 a.k.a brn)
document.write再考
brn
6
2.6k
Parsing Javascript
brn
12
7.4k
JSON & Object Tips
brn
1
300
CA 1Day Youth Bootcamp for Frontend LT
brn
0
690
Modern TypeScript
brn
2
680
javascript - behind the scene
brn
3
610
tc39 proposals
brn
0
660
プロダクト開発とTypeScript
brn
8
2.7k
React-Springでリッチなアニメーション
brn
1
520
Other Decks in Programming
See All in Programming
RustでAWS Lambda functionをいい感じに書く
taiki45
2
160
Productivity is Messing Around and Having Fun
hollycummins
1
190
JavaScript Closure
asoluka
0
2k
Timeline エディター拡張入門
yucchiy
0
460
ServerAction で Progressive Enhancement はどこまで頑張れるか? / progressive-enhancement-with-server-action
takefumiyoshii
6
520
TypeScript 関数型スタイルでバックエンド開発のリアル
naoya
49
16k
The grand strategy of Ruby Parser
yui_knk
5
390
Jetpack Composeとデザインシステム
rmakiyama
0
240
Open standards for building event-driven applications in the cloud
meteatamel
0
230
一文字エイリアスのすすめ
fujimura
0
200
TypeScriptのパフォーマンス改善
yajihum
14
5.2k
An adventure of Happy Eyeballs
coe401_
1
290
Featured
See All Featured
The Cult of Friendly URLs
andyhume
74
5.7k
GraphQLの誤解/rethinking-graphql
sonatard
56
9.3k
A better future with KSS
kneath
231
16k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
67
14k
Bootstrapping a Software Product
garrettdimon
PRO
302
110k
How GitHub (no longer) Works
holman
305
140k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
323
20k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
34
8.9k
BBQ
matthewcrist
80
8.8k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
22
1.6k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
21
2k
Raft: Consensus for Rubyists
vanstee
133
6.3k
Transcript
Debugger Statement
Name @brn (ꫬꅿ⨳ⵃ) Occupation ؿٗٝزؒٝسؒٝآص،٥ط؎ذ؍ـؒٝآص، Company Cyberagent ،سذؙأةآؔ AI Messenger
OSS Contributor of V8 About http://info.b6n.ch
What is debugger? debugger statementהכ؝٦س⚥ח剅ֻֿהדرغحؖ饯⹛׃ـ ٖ؎ؙ׃גֻ堣腉
const ret = foo()! if (ret) {! debugger;! }!
None
In V8 BytecodeהJIT؝٦سדⰟ鸐ךⳢ椚遤ֲ
Bytecode DebuggerعٝسָٓDebuggerغ؎ز؝٦س鋅אֽה Runtime_HandleDebuggerStatementㄎן⳿׃גծ✲ח涫 ꐮׁגְ؝٦ٕغحؙㄎן⳿ׅ In V8
JIT Code JIT⻉ך麓玎דㄏ⟀ך⽃秪⻉הְֲ剑黝⻉ָ遤ָծך麓 玎דDebugger Statementכ⯓玎ך Runtime_HandleDebuggerStatementㄎן⳿׃ך؝٦سפה湫 䱸㢌䳔ׁ In V8
Break Point אְדזךדBreakpointחאְג ـٓؐؠך؎ٝألؙةַ䭷㹀ֿׅהָדֹ • In V8
None
In V8 DebugBreakכDebugger Statementה麩גוֿח䯏Ⰵַׁ ַזְךד✲חRuntime_HandleDebuggerStatementהַח כ㢌䳔דֹזְ
Bytecode DebugBreakعٝسָٓDebug::HandleDebugBreakㄎן⳿׃ גծ穠卓Debugger StatementהずׄⳢ椚遤ֲ In V8
JIT Code(X64) ـٖ؎ؙه؎ٝزכׅץגInt3ㄏ⟀ָ涪遤ׁגSIGTRAP䒷ֹ 饯ֿׅ interruptָ饯ֿהStackGuard::HandleInterruptsָㄎן⳿ׁ גծַֿDebug::HandleDebugBreakפ In V8
Future ⯓傈ךTC39 Meetingדproposal-debugger-operandָStage1ח ז
proposal-debugger-operand ـٖ؎ؙه؎ٝزךؚٕ٦ف⻉ח״♧俕ON/OFFծ勴⟝➰ֹـ ٖ؎ؙך鏣㹀瘝ָ遤ִ Future
const log = (v) => {! debugger { group: 'logging'
};! console.log(v);! };!
const route = (httpRequest) => {! debugger {! test: ()
=> httpRequest.tracing || !isProduction! };! console.log(v);! };!
㹋騧 涪儗חכDebugger㙵鴥דծٔٔ٦أ儗ח嶊ׅ Webpack⢪גזUglifyָ嶊׃גֻ v4ך㜥さכmode productionד䩛ח嶊ִ
class Logger {! fatal() {! console.error("Error");! debugger;! }! }!
תה ⢪ג➂㼰זְ⽩韋דָׅ涪儗ח⢪ֲה穠圓嚂דׅ