Add CliInfo page to gallery#131
Conversation
|
Can we add the debug info as a single page, like 'align', 'table' or other examples so that we don't need to add a command line option for that purpose. We might also need to collect console capabilities information like 'Link'. This can be reserved for future work |
Im afraid if someone report that gallery does not renders properly we can't relly on
Ill invistigate that. |
|
Spectre.Console have some utility method to get console capabilities. IIRC You can refer to 'AnsiConsole.Profile.Capabilities' to figure out the supported/enabled console capabilities, where Link should be one of them. I would still prefer to make debug info as a separate page in gallery app for the following reasons
So, maybe instead of calling it debug info, calling it console info / system info and making it another page under gallery app might be more appropriate here? |
Maybe we should enable utf8 by default using System.Console? Console.OutputEncoding = System.Text.Encoding.UTF8;
Console.InputEncoding = System.Text.Encoding.UTF8;
we can use some extra mode, using env variables, like you did in VDom Tree Visualization: $env:RC_PRINT_VDOM_TREE="true"
dotnet runthat mode will give some simplified console output without any Spectre renerables. |
|
So.
Ill update it a bit later |
|
yeah. icons does't work for me for some reason |
|
You need to enable Unicode support for cli on your system as well Check the doc below on how to enable it |

Partially solves #84 (bc im not sure of what type of information is required)
Now when you just run gallery it starts app (as before).
Now when you run gallery with
debug-clicommand it outputs debug info (i.e.razorconsole-gallery debug-cli).Feel free to requrest exact debug information (with ways to gather it).
debug-clioutputs json (bc i thought it would be much easier to parse / navigate).For example on my system it outputs
{ "os": { "architecture": "X64", "description": "Microsoft Windows 10.0.26200", "framework": ".NET 8.0.22", "rid": "win-x64" }, "culture": { "ui": "ru-RU", "current": "ru-RU" }, "console": { "encoding": { "input": "Codepage - 866", "output": "Codepage - 866" }, "redirection": { "inputRedirected": "False", "outputRedirected": "False", "errorRedirected": "False" }, "size": { "window": { "x": "120", "y": "30" }, "buffer": { "x": "120", "y": "30", } }, "color": { "foreground": "Gray", "background": "Black" } } }I also added
launchSettting.jsonto easilly test that command. Just setcommandLineArgstodebug-cliand it will always lunch debug command when run