Skip to content

Enhancement: show stack trace instead of undefined when executing custom scripts to help with debugging #706

@polynook

Description

@polynook

Is your feature request related to a problem? Please describe.
My custom media script stopped working recently with the VSCode toast showing an utterly unhelpful error message:

Front Matter CMS: Optimize Media: undefined.

I figured I'd check the output terminal of the extension for more details but it wasn't any better with an output like this:

["INFO" - 14:11:08]  Executing: node "/workspaces/app/.frontmatter/scripts/optimize-media.js" "/workspaces/app" "/workspaces/app/.frontmatter/assets/images"
["ERROR" - 14:11:08]  Front Matter CMS: Optimize Media: undefined

Describe the solution you'd like
It would be great if we could see the full stack trace inside the VS Code output to help us better understand and debug what went wrong and what exactly returned "undefined". I've triple-checked the docs and my script and config seem to be configured correctly.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions