I keep getting "Error running 'MayaCharm': Failed to find free socket port" when trying to debug. The Execute Document in Maya and Attach to log doesn't provide any error, but do nothing.
I've run the following in Maya, and set the tool to use this port in settings and the remote debugger.:
import maya.cmds as cmds
if not cmds.commandPort(':7720', q=True):
print cmds.commandPort(':7720', q=True)
I'm using Windows, Pycharm Professional 2017.3 and Maya 2017, Update 3.
Edit: After some restarts the Console log and Send Document to Maya started working. Debugger still complains about not finding a free socket port though.