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

Added config options for console / logging (size, wrapping, etc.) #3720

Closed
wants to merge 2 commits into from

Conversation

doctorjei
Copy link

Description

I am not sure if you are interested in pulling this - but I had some trouble debugging an extension fix, so I ended up adding some error tracing config options. They also work with the GUI. Specifically, these options are added under "Exception trace overrides (development)":

Trace Line Width (0 for console width) [number]
Extra Trace Lines [number]
Trace Word Wrap [Checkbox]
Show Local Variables [Checkbox]
Maximum Stack Frames (0 for no limit) [Number]

All of the default values match the current setup in SD.Next.

@vladmandic
Copy link
Owner

vladmandic commented Jan 22, 2025

not sure if i want to overload sdnext settings with all those tracing options or add opts into lightweight errors module.
but having them configurable is good - why not use env variables that are typically used for debugging to start with?
(fyi, list of existing ones https://github.com/vladmandic/automatic/wiki/Debug)

we can use SD_TRACE_xxx for this
e.g. show_locals=os.environ.get('SD_TRACE_LOCALS', None) is not None

and we can document them in the wiki

if you're open to that concept, please update the pr.

@vladmandic
Copy link
Owner

@doctorjei any updates?

@doctorjei
Copy link
Author

Apologies for my delay. I agree that your suggestion is a good one. It may take me time to find a free block to update this. But if you need to close the PR in the meantime, go for it of course!

@vladmandic
Copy link
Owner

vladmandic commented Jan 28, 2025

no issues with keeping it open if you want to continue on it
i'll just convert it to draft pr and you flip it back when you think its ready

@vladmandic vladmandic marked this pull request as draft January 28, 2025 13:30
@vladmandic vladmandic changed the base branch from master to dev January 28, 2025 13:30
@vladmandic
Copy link
Owner

update: i've added your idea in the latest dev branch and docs at https://github.com/vladmandic/automatic/wiki/Debug#tracebacks

@vladmandic vladmandic closed this Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants