I want to explore code paths in Cassandra database, so after getting the code from git and explore it a bit I noticed that it starts a daemon process when I run it from Eclipse. I supposed that when this happens, I can no longer use the IDE to follow where the code is. Due to another problem I created this question and the person who replied talked about a debug port. I'm not familiar with this concept, and after googling it, the best explanation I found was on Wikipedia:

Debug port is a port included in a device to simplify development and debugging, which is not necessary for normal functioning of it. Debug ports are usually not removed or disabled to avoid costs of design changes, and can be used by modders and hackers to get extra functionality.

Which doesn't provide a lot of information on what a debug port is. Anyone care to clarify, please?


2 Answers 2


The debug port on the Wikipedia page refers to a physical i/o port-- for example, when you are doing Windows kernel hacking, you might connect the debugger to the target machine through a serial port.

The debug port in the question you reference is a different but related concept. You can start a Java virtual machine so that it listens on a particular TCP/IP network port for a debugger to connect and issue commands to control the JVM to do debugger tasks. A network port is just a 16-bit number. The answer to the referenced question describes how to start Cassandra so its JVM is listening for a debugger. In this case you need to specify the same number for the debug port on the Cassandra command line and when invoking the Eclipse debugger. Then Eclipse will be able to connect to and control the JVM running Cassandra, by issuing commands to that port.

  • Ok, I can issue commands with the debugger, but how will that help me to see the program code execution and stop at breakpoints throughout the code? I'm probably wrong, but from your answer, I got the impression that the debugger would be used similarly to a command prompt sending making calls to a service. Jul 21, 2016 at 7:19
  • @sedulam -- No, connecting the debugger to the JVM this way lets you use the debugger as normal-- setting breakpoints, stepping through, etc.
    – antlersoft
    Jul 21, 2016 at 14:34

Rather than think of it in the abstract, looks at a real world example: compare the check-engine light on a car, to the ODB-II port.

OBD stands for On-board diagnostics. In normal operation of the car, when there is a problem, the check-engine light turns on and little more than that is used to indicate a problem. A technician connects to the debug port on the car, from which diagnostic codes can be read indicating a wide variety of issues.

The same kind of diagnostic access can be provided to any system.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.