The application is available for remote debugging when started using the 'bootRunLocal' gradle task (e.g. ap-tools server start --local-api)
To debug the locally running API, do the following in the approved-premises-api Intellij Project:
- Click 'Run' -> 'Edit Configurations...'
- Click on the '+' symbol at the top left
- Choose 'Remote JVM Debug'
- In the Run Configuration set the following:
- Name can be whatever you like e.g. 'Remote API'
- Host and port should be localhost:32323
- Module classpath should be 'approved-premises-api'
- After starting the API locally, run the new Configuration using 'Run' -> 'Run...'
If successful, the Debug Tool Window should appear saying "Connected to the target VM, address: 'localhost:32323', transport: 'socket'".
Break points can now be used in Intellij to debug