Reputation: 25
when we start the debugger in eclipse we see the following projectName.className at localhost:61744 in the debug window so could any explain the purpose or basically why does it debug on localhost
Upvotes: 1
Views: 1082
Reputation: 201447
localhost
is the name customarily assigned to the loopback address 127.0.0.1
, it's another way of saying the current machine. Per the Wikipedia article,
Various Internet Engineering Task Force (IETF) standards reserve the IPv4 address block 127.0.0.0/8, in CIDR notation and the IPv6 address ::1 for this purpose. The most common IPv4 address used is 127.0.0.1. Commonly these loopback addresses are mapped to the hostnames, localhost or loopback.
Upvotes: 0
Reputation: 6523
this is the way the remote debugging works. you connect remotely with the java application you want to debug from. Most of the time we debug an application running on the same machine as your IDE. Therefore you can use localhost (which allows you to connect on and from the local machine )
Upvotes: 0
Reputation: 1500555
The JVM is basically started using a network port for debugging. This allows the debugger to be on a different machine, which can be very useful at times.
Now when you're debugging locally, the JVM has been started on your local machine - the localhost
IP address just refers to that, the loopback adapter for your local machine. You can attach the Eclipse debugger to a JVM running on another machine using the "Remote Java Application" debug configuration, but most of the time you'd just debug locally.
You can ignore the "localhost:" part, basically - it's just telling you which port the JVM has exposed for debugging.
Upvotes: 1