The chrome.debugger API serves as an alternate transport for Chrome's remote debugging protocol. Use chrome.debugger to attach to one or more tabs to instrument network interaction, debug JavaScript, mutate the DOM and CSS, etc. Use the Debuggee tabId to target tabs with sendCommand and route events by tabId from onEvent callbacks.
The chrome.debugger API serves as an alternate transport for Chrome's remote debugging protocol. Use chrome.debugger to attach to one or more tabs to instrument network interaction, debug JavaScript, mutate the DOM and CSS, etc. Use the Debuggee tabId to target tabs with sendCommand and route events by tabId from onEvent callbacks. * available since Chrome 26 * https://developer.chrome.com/extensions/debugger
(attach target required-version)
Attaches debugger to the given target.
|target| - Debugging target to which you want to attach. |required-version| - Required debugging protocol version ('0.1'). One can only attach to the debuggee with matching major version and greater or equal minor version. List of the protocol versions can be obtained here.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/extensions/debugger#method-attach.
Attaches debugger to the given target. |target| - Debugging target to which you want to attach. |required-version| - Required debugging protocol version ('0.1'). One can only attach to the debuggee with matching major version and greater or equal minor version. List of the protocol versions can be obtained here. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/extensions/debugger#method-attach.
(detach target)
Detaches debugger from the given target.
|target| - Debugging target from which you want to detach.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/extensions/debugger#method-detach.
Detaches debugger from the given target. |target| - Debugging target from which you want to detach. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/extensions/debugger#method-detach.
(get-targets)
Returns the list of available debug targets.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [result] where:
|result| - Array of TargetInfo objects corresponding to the available debug targets.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/extensions/debugger#method-getTargets.
Returns the list of available debug targets. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [result] where: |result| - Array of TargetInfo objects corresponding to the available debug targets. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/extensions/debugger#method-getTargets.
(send-command target method)
(send-command target method command-params)
Sends given command to the debugging target.
|target| - Debugging target to which you want to send the command. |method| - Method name. Should be one of the methods defined by the remote debugging protocol. |command-params| - JSON object with request parameters. This object must conform to the remote debugging params scheme for given method.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [result] where:
|result| - JSON object with the response. Structure of the response varies depending on the method name and is defined by the 'returns' attribute of the command description in the remote debugging protocol.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/extensions/debugger#method-sendCommand.
Sends given command to the debugging target. |target| - Debugging target to which you want to send the command. |method| - Method name. Should be one of the methods defined by the remote debugging protocol. |command-params| - JSON object with request parameters. This object must conform to the remote debugging params scheme for given method. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [result] where: |result| - JSON object with the response. Structure of the response varies depending on the method name and is defined by the 'returns' attribute of the command description in the remote debugging protocol. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/extensions/debugger#method-sendCommand.
(tap-all-events chan)
Taps all valid non-deprecated events in chromex.ext.debugger-api namespace.
Taps all valid non-deprecated events in chromex.ext.debugger-api namespace.
(tap-on-detach-events channel & args)
Fired when browser terminates debugging session for the tab. This happens when either the tab is being closed or Chrome DevTools is being invoked for the attached tab.
Events will be put on the |channel| with signature [::on-detach [source reason]] where:
|source| - The debuggee that was detached. |reason| - Connection termination reason.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/debugger#event-onDetach.
Fired when browser terminates debugging session for the tab. This happens when either the tab is being closed or Chrome DevTools is being invoked for the attached tab. Events will be put on the |channel| with signature [::on-detach [source reason]] where: |source| - The debuggee that was detached. |reason| - Connection termination reason. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/extensions/debugger#event-onDetach.
(tap-on-event-events channel & args)
Fired whenever debugging target issues instrumentation event.
Events will be put on the |channel| with signature [::on-event [source method params]] where:
|source| - The debuggee that generated this event. |method| - Method name. Should be one of the notifications defined by the remote debugging protocol. |params| - JSON object with the parameters. Structure of the parameters varies depending on the method name and is defined by the 'parameters' attribute of the event description in the remote debugging protocol.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/debugger#event-onEvent.
Fired whenever debugging target issues instrumentation event. Events will be put on the |channel| with signature [::on-event [source method params]] where: |source| - The debuggee that generated this event. |method| - Method name. Should be one of the notifications defined by the remote debugging protocol. |params| - JSON object with the parameters. Structure of the parameters varies depending on the method name and is defined by the 'parameters' attribute of the event description in the remote debugging protocol. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/extensions/debugger#event-onEvent.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close