idea 全家桶使用总结
1. debug 相关
1.1 问题:
Intellij Debugger slow: Method breakpoints may dramatically slow down debugging
解答:
From the JetBrains Team: "Method breakpoints will slow down debugger a lot because of the JVM design, they are expensive to evaluate. Remove method breakpoints and consider using the regular line breakpoints.". See more.
To make the long story short, it seems that the root issue is that Method Breakpoints are implemented by using JPDA's Method Entry & Method Exit feature. This implementation requires the JVM to fire an event each time any thread enters any method and when any thread exits any method.
参考来源:https://stackoverflow.com/questions/27966065/intellij-debugger-slow-method-breakpoints-may-dramatically-slow-down-debugging
1.2 goland debug 看不到变量
观察日志: WARNING: undefined behavior - version of Delve is too old for Go version go1.26.5 (maximum supported version 1.23)
需要升级 Delve
教程: https://blog.csdn.net/qq_41312061/article/details/112510204
其中: dlv.path=你的gopath路径\\dlv.exe(新的dlv.exe路径)
可以通过cmd查看实际的值。
C:\Windows\System32>where dlv
D:\go_env\workspace\bin\dlv.exe
配置的时候建议是使用"/", 最稳妥。 例如:
dlv.path=D:/go_env/workspace/bin/dlv.exe
2. IDEA中无法import自己工程中类的问题
地址: https://blog.csdn.net/ma18845639852/article/details/125060829
3. idea 社区版问题
3.1 报错: blocking external HTTP repositories?
maven 高版本需要仓库的域名是https, http 会阻塞住。
参考: https://stackoverflow.com/questions/67001968/how-to-disable-maven-blocking-external-http-repositories
maven- default -http-blocker external:http:* Pseudo repository to mirror external repositories initially using HTTP. http: //0.0.0.0/
这一段需要删除, 注释掉不管用。 (无限版,高级版 注释掉也是可以的)
4. 换行符相关
目的:与原来文件的换行符号保持一致。
设置: Choose

浙公网安备 33010602011771号