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
520
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.2k
JSON & Object Tips
brn
1
300
CA 1Day Youth Bootcamp for Frontend LT
brn
0
680
Modern TypeScript
brn
2
680
javascript - behind the scene
brn
3
600
tc39 proposals
brn
0
650
プロダクト開発とTypeScript
brn
8
2.7k
React-Springでリッチなアニメーション
brn
1
500
Other Decks in Programming
See All in Programming
Git Lint
bkuhlmann
4
750
スクラムガイドのスプリントレトロスペクティブを改めて読みかえしてみた / Re-reading the Sprint Retrospective Section in the Scrum Guide
mackey0225
3
410
Java 22 Overview
kishida
1
180
코틀린으로 멀티플랫폼 만들기
pangmoo
0
150
Hanami and htmx
bkuhlmann
0
200
MetricKitで予期せぬ終了を検知する話 / Detect unexpected termination with MetricKit
nekowen
1
180
R言語の環境構築と基礎 Tokyo.R 112
bob3bob3
0
260
DMMプラットフォームがTiDB Cloudを採用した背景
pospome
8
4k
HUIT新歓2024「競技プログラミング、やってみませんか?」
slephy2784
1
270
コーンフレークから始める モデリング会話入門
ogurotakayuki
0
350
冗長なエラーログを削減し、スタックトレースを手に入れる / Reducing Verbose Error Logs and Obtaining Stack Traces
upamune
0
340
Netty Chicago Java User Group 2024-04-17
sullis
0
170
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
357
22k
Building a Scalable Design System with Sketch
lauravandoore
456
32k
The Art of Programming - Codeland 2020
erikaheidi
42
12k
Atom: Resistance is Futile
akmur
259
25k
Art, The Web, and Tiny UX
lynnandtonic
289
19k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
14
1.5k
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
BBQ
matthewcrist
80
8.8k
Typedesign – Prime Four
hannesfritz
36
2.1k
jQuery: Nuts, Bolts and Bling
dougneiner
59
7.1k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
187
16k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
17
1.4k
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;! }! }!
תה ⢪ג➂㼰זְ⽩韋דָׅ涪儗ח⢪ֲה穠圓嚂דׅ