Local Debugging Guide for Extend Override — Java
This guide covers everything specific to debugging an Extend Override app written in Java. For general debugging concepts — environment setup, VS Code debug workflow, log reading, and common issues — see:
- Extend local debugging guide — common concepts for all Extend app types
- Java language setup guide — Java prerequisites, JVM remote debug, jq, and Java-specific troubleshooting
- Extend Override debugging guide — Override-specific concepts for all languages
The examples in this guide use the matchmaking use case
(matchmaking-function-grpc-plugin-server-java). The project structure and debugging steps are
the same for every other Override use case — only the service file and proto differ. See the
service file reference table at the end of this guide.
Project structure
matchmaking-function-grpc-plugin-server-java/
├── build.gradle # Gradle build — includes protobuf plugin
├── gradlew # Gradle wrapper
├── .env.template # Environment variable template
└── src/main/
├── java/net/accelbyte/matchmaking/function/grpc/server/
│ ├── App.java # Entry point — gRPC server, auth, observability
│ ├── MatchmakingFunctionService.java # Your override logic
│ ├── GameRules.java # Rules parsing (POJO)
│ ├── AllianceRule.java # Alliance rule model
│ ├── config/
│ │ └── AppConfiguration.java # Spring Boot configuration
│ └── interceptor/
│ ├── AuthInterceptor.java # IAM token validation interceptor
│ └── LoggingInterceptor.java # Request/response logging interceptor
├── proto/
│ └── matchFunction.proto # Protobuf definition
└── resources/
├── application.yml # Server config, auth toggle
└── logback-spring.xml # Logging configuration
| File | What it does |
|---|---|
App.java | Entry point — starts the gRPC server, wires the auth interceptor and observability stack. |
MatchmakingFunctionService.java | Your override logic — extends MatchFunctionGrpc.MatchFunctionImplBase, implements getStatCodes, validateTicket, enrichTicket, makeMatches, backfillMatches. |
interceptor/AuthInterceptor.java | Validates every incoming gRPC call's IAM token. |
src/main/proto/matchFunction.proto | Protobuf definition — source of truth for service methods. |
src/main/resources/application.yml | Server configuration, including auth toggle. |
Port numbers:
| Port | Purpose |
|---|---|
6565 | gRPC server — receives calls from AGS |
8080 | Prometheus metrics endpoint (/metrics) |
In application.yml, PLUGIN_GRPC_SERVER_AUTH_ENABLED defaults to false
(${PLUGIN_GRPC_SERVER_AUTH_ENABLED:false}). This is the opposite of the Go, Python, and C#
repos, which default to true. Always set it explicitly in your .env to avoid unexpected
behavior in either direction.
Running the service locally
From the terminal
# Export all variables from your .env file
export $(grep -v '^#' .env | xargs)
./gradlew bootRun
Confirming the service is up
You should see Spring Boot and gRPC startup logs similar to:
INFO net.accelbyte.matchmaking.function.grpc.server.App - Starting App
INFO o.l.springboot.grpc.GRpcServerRunner - Starting gRPC Server ...
INFO o.l.springboot.grpc.GRpcServerRunner - gRPC Server started, listening on port 6565
INFO o.s.b.w.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8080
Verify the gRPC server is reachable:
grpcurl -plaintext localhost:6565 list
The Java Override repo does not ship with a .vscode/tasks.json. Use ./gradlew bootRun from
the terminal, or configure a VS Code task manually to suit your workflow.
Attaching the debugger
JVM remote debug (recommended)
The Java repo does not ship with a .vscode/launch.json. Use Gradle's built-in JVM debug
support instead:
export $(grep -v '^#' .env | xargs)
./gradlew bootRun --debug-jvm
This starts the application and suspends it until a debugger connects on port 5005.
Then add this launch configuration to your VS Code .vscode/launch.json (create the file if
it does not exist):
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach: JVM (5005)",
"type": "java",
"request": "attach",
"hostName": "localhost",
"port": 5005
}
]
}
Select "Attach: JVM (5005)" from the Run and Debug dropdown to connect.
IntelliJ IDEA / Eclipse
Create a Remote JVM Debug configuration targeting localhost:5005. Run
./gradlew bootRun --debug-jvm in a terminal, then attach from the IDE.
Where to put breakpoints
| What you want to investigate | File and location |
|---|---|
| A specific gRPC method being called | MatchmakingFunctionService.java — top of the relevant method |
| Streaming ticket processing | MatchmakingFunctionService.java — inside the makeMatches StreamObserver.onNext |
| Rules parsing | MatchmakingFunctionService.java — gson.fromJson(rules.getJson(), GameRules.class) |
| Auth / token validation failure | interceptor/AuthInterceptor.java — interceptCall method |
| Service not starting at all | App.java — the main method and Spring context initialization |
For conditional breakpoint syntax, see the Java language guide.
Reading logs
The service uses Logback with structured log output configured in logback-spring.xml. For
jq log filtering, see the
Java language guide.
To stream only error-level output while the service runs:
./gradlew bootRun 2>&1 | grep ERROR
Testing the override manually
For grpcurl usage and triggering the overridden AGS feature, see
Testing the override manually in the Override main
guide.
The demo/ directory contains a Postman collection (*.postman_collection.json) with
pre-built requests. Import it into Postman and update baseUrl and token for your local
setup.
Java-specific troubleshooting
Proto changes have no effect
Symptom: You edited src/main/proto/matchFunction.proto but nothing changed at runtime.
Cause: The generated gRPC stubs have not been rebuilt.
Fix:
./gradlew generateProto
Or run a full clean build to guarantee regeneration:
./gradlew clean build
PLUGIN_GRPC_SERVER_AUTH_ENABLED defaults to false
Symptom: Auth appears to be disabled even though you did not explicitly disable it.
Cause: The application.yml default for PLUGIN_GRPC_SERVER_AUTH_ENABLED is false
(unlike Go, Python, and C# which default to true).
Fix: Set PLUGIN_GRPC_SERVER_AUTH_ENABLED=true explicitly in your .env if you want auth
enabled, or confirm false is correct for your local dev session.
Gradle daemon issues
If the service behaves inconsistently between runs, stop the Gradle daemon and retry:
./gradlew --stop
./gradlew bootRun
JVM port conflict for remote debugging
See JVM port conflict for remote debugging in the Java language guide.
AI assistance
Each Override use case's app template ships with a Claude agent skill at
.claude/skills/debugging-guide/SKILL.md. For AI prompting tips and MCP server details, see
Debugging with AI assistance in the Override main
guide.
Service file reference by use case
The debugging workflow above applies to all Override use cases. Only the service file and proto vary. Use this table to find your implementation file:
| Use case | Java service file | Proto file |
|---|---|---|
| Matchmaking | …/grpc/server/MatchmakingFunctionService.java | src/main/proto/matchFunction.proto |
| Cloud Save Validator | See repo README | See repo README |
| Lootbox Roll | See repo README | See repo README |
| Profanity Filter | See repo README | See repo README |
| Revocation | See repo README | See repo README |
| Rotating Shop Items | See repo README | See repo README |
| Session DSM | See repo README | See repo README |
| Session Manager | See repo README | See repo README |
| Challenge Assignment | See repo README | See repo README |
For the repository link for each use case and language, see Extend Override repositories.