调试器 API¶
- The
Debugger
接口 - 调试器对象
new Debugger([global, ...])
- 调试器原型对象的访问器属性
- 调试器处理程序函数
- 调试器原型对象的函数属性
addDebuggee(global)
addAllGlobalsAsDebuggees()
removeDebuggee(global)
removeAllDebuggees()
hasDebuggee(global)
getDebuggees()
getNewestFrame()
findSources()
findScripts([query])
findSourceURLs()
findObjects([query])
clearBreakpoint(handler)
clearAllBreakpoints()
findAllGlobals()
makeGlobalObjectReference(global)
adoptDebuggeeValue(value)
adoptFrame(frame)
adoptSource(source)
enableAsyncStack(global)
disableAsyncStack(global)
enableUnlimitedStacksCapturing(global)
disableUnlimitedStacksCapturing(global)
- Debugger 对象的静态方法
- Debugger.Object
- Debugger.Object 原型的访问器属性
proto
class
callable
name
displayName
parameterNames
script
environment
isError
errorMessageName
errorLineNumber
errorColumnNumber
isBoundFunction
isArrowFunction
isGeneratorFunction
isAsyncFunction
isClassConstructor
isPromise
boundTargetFunction
boundThis
boundArguments
isProxy
proxyTarget
proxyHandler
promiseState
promiseValue
promiseReason
promiseAllocationSite
promiseResolutionSite
promiseID
promiseDependentPromises
promiseLifetime
promiseTimeToResolution
allocationSite
- Debugger.Object 原型的函数属性
getProperty(key, [receiver])
setProperty(key, value<, [receiver])
getOwnPropertyDescriptor(key)
getOwnPropertyNames()
getOwnPropertyNamesLength()
getOwnPropertySymbols()
defineProperty(key, attributes)
defineProperties(properties)
deleteProperty(key)
seal()
freeze()
preventExtensions()
isSealed()
isFrozen()
isExtensible()
makeDebuggeeValue(value)
isSameNative(value)
isSameNativeWithJitInfo(value)
isNativeGetterWithJitInfo()
decompile([pretty])
call(this, argument, ...)
apply(this, arguments)
executeInGlobal(code, [options])
executeInGlobalWithBindings(code, bindings, [options])
createSource(options)
asEnvironment()
unwrap()
unsafeDereference()
forceLexicalInitializationByName(binding)
getPromiseReactions
- Debugger.Object 原型的访问器属性
- Debugger.Script
- Debugger.Script 用于 JSScripts
- Debugger.Script 用于 WebAssembly
- 约定
- Debugger.Script 原型对象的访问器属性
- Debugger.Script 原型对象的函数属性
getChildScripts()
getPossibleBreakpoints(query)
getPossibleBreakpointOffsets(query)
getOffsetMetadata(offset)
setBreakpoint(offset, handler)
getBreakpoints([offset])
clearBreakpoint(handler, [offset])
clearAllBreakpoints([offset])
getEffectfulOffsets()
getOffsetsCoverage()
:isInCatchScope([offset])
- 已弃用的 Debugger.Script 原型函数
- Debugger.Source
- Debugger.Environment
- Debugger.Frame
- Debugger.Memory
- 分配站点跟踪
- 分配日志记录
- 普查
Debugger.Memory.prototype
对象的访问器属性trackingAllocationSites
allocationSamplingProbability
maxAllocationsLogLength
allocationsLogOverflowed
- Debugger.Memory 处理程序函数
onGarbageCollection(statistics)
collections
reason
nonincrementalReason
gcCycleNumber
Debugger.Memory.prototype
对象的函数属性drainAllocationsLog()
takeCensus(options)
- 内存使用分析揭示了实现细节
- 对象
- 字符串
- 脚本
- 一般约定
- 教程:显示每个调用路径的分配
- 教程:使用
Debugger
设置断点 - 教程:在执行 debugger; 语句时评估表达式