- Install the Factorio Mod Tool Kit extension in VS Code.
- Switch to the run/debug view (View->Run) and select "create a launch.json file"
- Select the debug environment "Factorio Mod Debug".
- Adjust the paths and launch settings as required. Check Intellisense for additional launch options.
- Press the green 'play' button or F5 to start debugging.
The debugger also injects runtime diagnostics into all hooked mods:
- Event Handler Replacement: A warning will be issued when an event handler is registered to an event that already has a handler that is not equal to the new one.
If Zip File Explorer is also installed, breakpoints and stepping will work inside zipped mods.