[Solved]: ERROR: transport error 202: gethostbyname: unknown host ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750]

Problem Statement:
Eclipse Mac OS X Debug Error:
ERROR: transport error 202: gethostbyname: unknown host
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750]

Solution 1:

I had exactly the same issue (on Mac OS), in my case the line in /etc/host was commented out:

127.0.0.1    localhost

Solution 2:

  • You will see three 3  hosts, hosts~orig, hosts.equiv on /etc/hosts
  • Where hosts file is Zero byte in size and hosts~orig contains all settings
  • Delete hosts file 
  • Create duplicate of hosts~orig and rename as hosts

It’s explained in Eclipse Wiki:

 https://wiki.eclipse.org/Debug/FAQ#I_can_run_a_program_but_not_debug_it.3F.3F.3F