Is there an easy way to show the name of all nodes, say, in a scope? Without having to assign explicit styles to the nodes? (Context: complex figure, broken down in lots of subcommands, not feasible to change all of it).
My idea was something like this, but that ends in endless recursion:
\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}[debugstyle/.style={
append after command={% courtesy of Alenanno ref: https://tex.stackexchange.com/questions/287967/drawing-thin-line-around-a-multipart-tikz-shape#comment696552_287972
\pgfextra{\node [right] at (\tikzlastnode.mid east) {\tikzlastnode};}
},
}]
% this works, but not what I want:
\node[debugstyle] (hello) at (0,0) {Hello world};
% this fails, apparently endless recursion:
\begin{scope}[every node/.append style=debugstyle]
\node (hello) at (0,0) {Hello world};
\end{scope}
\end{tikzpicture}
\end{document}