I'm using teamcity-sdk-maven-plugin im my pom.xml to facilitate development, with this in IntelliJ, some shortcuts appear to start, restart, etc., the TeamCity is shown on Maven window, below tc-sdk
Using tc-sdk:start, the server debug happens on port 10111 and the agent debug happens on port 10112.
You need to include in IntelliJ a debug configuration for each of the ports
You can see some other information on https://github.com/JetBrains/teamcity-sdk-maven-plugin