我正在为Golang使用新的Intellij-idea,我想知道如何为它设置一个默认的调试端口?我知道如何在Visual Studio代码中实现它,但不知道IntelliJ。我用它作为后端应用程序开发,所以每次端口改变,我也必须在应用程序中改变它,否则会变得很繁琐。因而每次调试都会得到一个新的随机端口。在VS代码中则会有一个unch.jso,但Intellij没有json。
Have you tried creating a custom debug configuration:
Run | Edit configurations
+
button and select Go Remote
My Debug
Port
field, enter the desired port numberOK
Run | Debug... | 'My Debug'