--liveserver-verbose
and --liveserver-debug
command-line arguments
#1024
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Basing on my usage and on StackOverflow questions, the world needs
--liveserver-verbose
command line argument, which this branch implements.Default live server is quiet. Django guys made it quiet. And, well, for some, maybe this is good. Because theory says that you're supposed to have a lot of unit tests and when you start integration testing all your code should be A1-OKAY and 100% tested... in an ideal world.
... but in this world, I tend to stumble on "500 ERROR" spewed by LiveServer at my code. Unable to debug, unable to print stuff to the console. Helpless, really. Especially helpless, when I know that everything in the code is okay and the error is because of environment problems. But still, unable to debug it, I feel helpless.
And I don't like the feeling of being helpless.
So I present to you the
--liveserver-verbose
argument.It prints stuff on the stdout!
It can even print out a backtrace.
Is it ugly? Yes.
Can it be improved? Yes! Just like pytest-durations, it would be lovely to have some frames and a nicely formatted output.
But... I almost pressed "CREATE PULL REQUEST" here... I can improve it already.
Another option I present to you is
liveserver-debug
. This option drops to debugger in the console when a traceback occurs.Am I cool now? Am I the good guy? Can I take constructive criticism? Was I able to do all of that without switches on the command line? LET'S SEE!
What I would really like to see with this branch is how to collect those stdout texts nicely. If I don't use
-s
switch it prints out stderr on failing tests nicely. Perhaps you can help me improve this. Thanks!