Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
polynook opened this issue Nov 13, 2023 · 2 comments
Projects

Comments

@polynook
Copy link

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.

@polynook polynook added the enhancement New feature or request label Nov 13, 2023
@estruyf estruyf added this to To do in 9.4.0 via automation Nov 13, 2023
@estruyf
Copy link
Owner

estruyf commented Nov 13, 2023

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

image

@estruyf estruyf moved this from To do to In progress in 9.4.0 Nov 13, 2023
estruyf added a commit that referenced this issue Nov 13, 2023
@estruyf
Copy link
Owner

estruyf commented Nov 13, 2023

Update coming up in the latest beta

@estruyf estruyf moved this from In progress to Done in 9.4.0 Dec 8, 2023
@estruyf estruyf mentioned this issue Dec 12, 2023
@estruyf estruyf closed this as completed Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
9.4.0
Done
Development

No branches or pull requests

2 participants