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

Closed
opened 2026-10-05 02:53:20 +02:00 by adam · 2 comments
Owner

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.

**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. <!-- github-sync-id:1990770614 -->
adam closed this issue 2026-10-05 02:53:20 +02:00
Author
Owner

I will update this; the notification will also show a link to the output.

image
I will update this; the notification will also show a link to the output. <img width="558" alt="image" src="https://github.com/estruyf/vscode-front-matter/assets/2900833/f61b688b-8e8e-49a3-938e-43690054be8a"> <!-- github-comment-id:1808580198 -->
Author
Owner

Update coming up in the latest beta

Update coming up in the latest beta <!-- github-comment-id:1808584761 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/vscode-front-matter#561