python-web-pdb icon indicating copy to clipboard operation
python-web-pdb copied to clipboard

URL displayed on startup ignores host argument

Open jxrossel opened this issue 1 year ago • 1 comments

Very small issue: when specifying the host in the call to set_trace, e.g. web_pdb.set_trace(host="127.0.0.1"), the displayed log remains:

2024-12-24 08:28:13,758|CRITICAL|root.__init__:77|Web-PDB: starting web-server on http://<my_machine>:5555

This is due to web_console.py:78 where gethostname() is used even if host is provided

jxrossel avatar Dec 24 '24 07:12 jxrossel

host argument specifies IP address binding for underlying socket, so it's not always the IP address of the actual host. E.g. it may be '0.0.0.0' for receiving connections from all addresses.

romanvm avatar Mar 18 '25 10:03 romanvm