Using showkeys of my MikTeX 2.9, the code below
\documentclass{article}
\usepackage{showkeys}
\begin{document}
section \ref{sec:methods} section \ref{methods}
\section{Methods}
\label{sec:methods}
\end{document}
yields weird results:
As you see, only the first reference is detected by the package, and I get
! Missing \endcsname inserted.
<to be read again>
\BooleanFalse
l.20 section \ref{sec:methods} section \ref{
methods}
The control sequence marked <to be read again> should
not appear between \csname and \endcsname.
LaTeX Warning: Reference `\endcsname ' on page 1 undefined on input line 20.
My file does not include any non-UTF character. What's the problem here?

latex-toolsin MikTeX, so it should most definitely be installed and found on your system. If that is not the case, something very fishy is going on. – moewe Oct 02 '22 at 05:51showkeysversion that was installed regularly via MikTeX's console. (So this is not an installation issue, but I still think the comment above may be useful to other people who may get the impression thatshowkeysis not available in MikTeX or that it is generally a good idea to install packages from CTAN.) – moewe Oct 02 '22 at 05:51MikTeXitself includes ashowkeys.sty. So, I just updated the question. – Oct 02 '22 at 06:092022/04/12 v3.18– David Carlisle Oct 02 '22 at 08:46