Files
website-v2/pycharm_debugger.py
2025-01-09 10:01:43 -08:00

14 lines
411 B
Python

def set_trace():
import pydevd_pycharm
# this ip address is for the gateway IP, equivalent to host.docker.internal which
# isn't available on all platforms
gateway_ip = "172.17.0.1"
pydevd_pycharm.settrace(
host=gateway_ip,
port=12345, # Use the same port number configured in PyCharm
stdoutToServer=True,
stderrToServer=True,
suspend=False,
)