This version-agnostic Fabric mod allows you to inject NSight or Renderdoc into Minecraft, allowing you to attach at any time instead of having to launch the game through the GUI either manually or by launching the launcher (wow that sucks to say).
You can skip the dialog (useful for some dev environments) by setting the debugging
flag to the debugger you want.
Allowed options are:
-Ddebugger=nsight-frame
-Ddebugger=nsight-gpu
-Ddebugger=renderdoc