Skip to content

FR: Add frontend hooks for pre/post debug message #5489

@Steve-Mcl

Description

@Steve-Mcl

As a: node/plugin developer

I want to: hook into pre and post debug message creation in the UI

So that: I can display extra tools in the debug entry toolbar span OR affect the message entry in other ways (custom styling etc) without monkey patching RED.utils.createObjectElement

This request to add 2 new hooks:

  • debugPreProcessMessage
    • This hook should be triggered before processDebugMessage
    • It should send the incoming message e.g. RED.hooks.trigger('debugPreProcessMessage', { message })
    • NOTE: processDebugMessage will also need to return artifacts so that they can be accessed in debugPostProcessMessage hook...
      • proposed artifacts - { message, element, payload }(message is the original debug message, element is the element created byprocessDebugMessage`, payload - the reconstituted debug message)
  • debugPostProcessMessage
    • This hook should be triggered after processDebugMessage and should include the artifacts it generated e.g. RED.hooks.trigger('debugPostProcessMessage', { message, element, payload })

This will permit a node/plugin to update the debug message with a symbol or UUID that can be used as a key in the post handler and access things like the debug message data, the debug element and the final payload

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions