You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
LightWork3D/contrib/clion/GetCLionDebugPort.FCMacro

12 lines
438 B
Plaintext

import pydevd
from multiprocessing.connection import Listener
print("CLion debugger macro running. Starting listener to get port")
listen = Listener(('localhost', 39998), backlog=1)
link = listen.accept()
port = link.recv()
link.close()
listen.close()
print("Port", port, "received, starting debugger. Check CLion to see if a breakpoint has been hit and continue")
pydevd.settrace(port=port)
print("Debugger operating, leaving macro.")