This version-agnostic Fabric mod allows you to inject NSight or Renderdoc into Minecraft, without having to fiddle around with launchers, args or environment variables. At launch, it will ask you which debugger you want to attach, and injection can be skipped by closing the dialog. Supports both Linux and Windows, and should work with any version of Minecraft[citation needed], as long as Fabric was ported to it. Requires Fabric Loader 0.14.0+ and Java 17+.
- Install Fabric.
- Drop the mod into your mods folder
- Launch the game, pick the debugger you want to use
- Attach to the game process via your debugger of choice
- Profit?
You can skip the dialog (useful for dev environments) by setting the debugging flag to the debugger you want.
Allowed options are:
-Ddebugger=nsight-frame
-Ddebugger=nsight-gpu
-Ddebugger=renderdocIf the mod can't find your NSight installation, you can tell it where ngfx is:
Use either a JVM system property or an environment variable (the system property takes priority):
| Method | Example |
|---|---|
| System property | -Dngfx.path=C:\Program Files\NVIDIA Corporation\Nsight Graphics 2025.5\host\windows-desktop-nomad-x64\ngfx.exe |
| Environment variable | NGFX_PATH=C:\Program Files\NVIDIA Corporation\Nsight Graphics 2025.5 |
Both accept a direct path to the ngfx executable, an NSight Graphics installation root directory, or a directory containing the executable directly.
Windows:
%ProgramFiles%\NVIDIA Corporation\Nsight Graphics *\host\windows-desktop-nomad-x64\ngfx.exe%ProgramFiles(x86)%\NVIDIA Corporation\Nsight Graphics *\host\windows-desktop-nomad-x64\ngfx.exe
Linux:
~/nvidia/NVIDIA-Nsight-Graphics-*/host/linux-desktop-nomad-x64/ngfx
Tip
NSight is kind of a pain to find, as many people install it on different drives and on linux it doesn't really have a standard location outside ~/nvidia/. The newest version is preferred when multiple installations are found. If you have issues, check the logs to see where it's looking and add the path manually if needed.
If the mod can't find your RenderDoc installation, you can tell it where the library is:
Use either a JVM system property or an environment variable (the system property takes priority):
| Method | Example |
|---|---|
| System property | -Drenderdoc.path=C:\Program Files\RenderDoc |
| Environment variable | RENDERDOC_PATH=C:\Program Files\RenderDoc |
Both accept either a direct path to the library file (renderdoc.dll / librenderdoc.so) or the directory containing it.
On Linux, the legacy environment variable RENDERDOC_LIB_PATH (expects a direct path to librenderdoc.so) is still supported.
Windows
-Drenderdoc.pathsystem propertyRENDERDOC_PATHenvironment variable%ProgramFiles%\RenderDoc\renderdoc.dll- Versioned folders in
%ProgramFiles%(e.g.RenderDoc v1.32) - Same searches under
%ProgramFiles(x86)% %USERPROFILE%\RenderDoc\renderdoc.dll
Linux
-Drenderdoc.pathsystem propertyRENDERDOC_PATHenvironment variableRENDERDOC_LIB_PATHenvironment variable (legacy)- Common system library paths (
/usr/lib64/renderdoc/,/usr/lib/,/usr/lib/x86_64-linux-gnu/,/usr/local/lib/, etc.) ~/.local/lib/librenderdoc.so
Tip
Paths are searched in the order listed, and the first valid library found is used. If it can't find a valid .dll/.so, it will bail out and won't inject. Everything should be logged if anything goes wrong, so check the logs if you have issues.