Windows only. Requires
emmy_tool.exeandemmy_hook.dll(bundled with the plugin).
Attaches the Emmy Lua debugger to a running process by injecting emmy_hook.dll at runtime. No recompilation or pre-instrumentation needed.
- Open Run → Edit Configurations and add an Emmy Attach Debugger configuration.
- Choose an attach mode:
- Pid — enter the target process ID directly.
- Process Name — enter a name/path substring. If multiple processes match, a picker dialog appears; if nothing matches, all running processes are shown.
- Set Encoding to match the target process's string encoding (e.g.
gbkfor most Windows CJK apps,utf-8otherwise). - Set Architecture to
Auto detect, or override withx86/x64if auto-detection fails or the process is elevated.
Start the configuration with the Debug action. The plugin will:
- Detect (or use the specified) process architecture.
- Inject
emmy_hook.dllinto the target process viaemmy_tool.exe. - Connect to the debugger hook over TCP on
127.0.0.1.
Set breakpoints in your Lua source files before or after attaching — they take effect immediately.
- If the target process is elevated (run as administrator), the IDE must also be run as administrator.
- The injected
emmy_hook.dllis released when the debug session ends.
