You would need to write that code yourself.
There is no way to tell vanilla to highlight a block, even if vanilla has code that does it. You need to recreate it yourself, in your own code, and invoke your own code.
That, however, still leaves you the problem of displaying it as debug output which you can't, because your code will say "draw these blocks" then "delete all these blocks" and both of those will execute before any render code gets done to actually draw the highlight. The blocks are already gone.