The process.debugPort property is an inbuilt application programming interface of the process module which is used to get the debugging port used by the debugger if enabled.
Return Value: This property returns an integer value that specifies the debugging port used by the debugger if enabled.
Below examples illustrate the use of process.debugPort property in Node.js:
debug port is 9229
debug port is defined debug port is 9229
Note: The above program will compile and run by using the
node filename.js command.