Intellij如何设置默认调试端口

我正在为Golang使用新的Intellij-idea,我想知道如何为它设置一个默认的调试端口?我知道如何在Visual Studio代码中实现它,但不知道IntelliJ。我用它作为后端应用程序开发,所以每次端口改变,我也必须在应用程序中改变它,否则会变得很繁琐。因而每次调试都会得到一个新的随机端口。在VS代码中则会有一个unch.jso,但Intellij没有json。

Have you tried creating a custom debug configuration:

  1. Run | Edit configurations
  2. Click + button and select Go Remote
  3. Name it My Debug
  4. In the Port field, enter the desired port number
  5. Click OK
  6. Run | Debug... | 'My Debug'