Check out example codes for "java remote debug". It will help you in understanding the concepts better.

Code Example 1

java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000 OurApplication

Learn ReactJs, React Native from akashmittal.com