How to get page break functionality in UEFI applications

Konstantin Aladyshev

All UEFI shell commands have page break functionality.
If the command is called with the "-b" argument and the output is too
long, output would be splitted to pages with this message after each
Press ENTER to continue or 'Q' break:
How to get this functionality in your custom UEFI applications?

I've tried to use `ShellCEntryLib` as the entry point and have changed
all of my `Print(...)` statements to the `ShellPrintEx(-1,-1,...)` in
my UEFI application, but none of that have worked.

From the inspection of code I see that the aforementioned string is
defined in a file
and used in a file
in a `ConsoleLoggerPrintWithPageBreak` function.

`ConsoleLoggerPrintWithPageBreak` is called from the
`ConsoleLoggerOutputString` function, which itself is set to the

But in the same file I see:
`gST->ConOut = &(*ConsoleInfo)->OurConOut;`

As the `Print` function uses `gST->ConOut->OutputString` internally,
in the end it looks like it should call
`ConsoleLoggerPrintWithPageBreak`. But apparently this is not
happening? Why? What am I missing here?

ShellLib library class is included in my DSC file:
As `-?` option produces some output, I guess command line argument
parsing is happening successfully:
FS0:\> GOPInfo.efi -?
No help could be found for command 'GOPInfo.efi'.

Best regards,
Konstantin Aladyshev

Join to automatically receive all group messages.