Debugging runbook

When to use this

Connections fail, methods are missing, or calls hang — you need a structured debugging path.

Prerequisites

  • Running GG and consumer app
  • Access to Gateway console logs

Debugging flowchart when Graft connections or calls fail


Step 1: Enable byte-level logging

export GG_DEBUG=1
./gg ./MyLib.dll --port 8888 --httpPort 8889

Windows PowerShell:

$env:GG_DEBUG = "1"
.\gg.exe .\MyLib.dll --port 8888 --httpPort 8889

Logs incoming/outgoing binary IIP traffic to the console. Use for protocol-level issues only (verbose).


Step 2: Verify Gateway health

CheckCommand / action
Vision loadsOpen http://localhost:<httpPort>/vision
Module listedConfirm public types in Vision
Ports opencurl -I http://localhost:8889/vision
MCP portcurl http://localhost:8889/mcpport
Registrycurl http://localhost:8889/registry

Step 3: Verify consumer configuration

  1. Confirm GraftConfig.host matches GG ports and protocol — Transport guide
  2. Check config file precedence — env may override code — GraftConfig reference
  3. Confirm the Graft package installed from the correct registry URL — Install a Graft

Step 4: Common Gateway issues

SymptomFix
Port 80 permission deniedUse --port 8888 --httpPort 8889
Module not loadedExplicit --modules; correct --runtime
Wrong runtime (CLR vs netcore)Match DLL target framework
Java failsUse JAR paths; check JAVA_HOME
Python/Ruby deps missingInstall deps in host environment
CORS errors in browserPorts and CORS
Firewall blocksOpen WS/TCP/HTTP ports

Step 5: Interactive testing

Use Graftcode Vision Try it out to invoke methods without writing consumer code:

Graftcode Vision Try it out panel for an instance method, with constructor parameters and a Run control

If Try it out succeeds but your application fails, the issue is likely consumer configuration, registry install, or auth — not Gateway exposure.


Step 6: Escalation checklist

  • GG_DEBUG=1 captured for failing call
  • Vision shows expected methods
  • Graft package version matches hosted module version
  • --types filter includes your facade
  • Project Key / registry URL correct for installs

See also