Idea 的小技巧
调试的时候的断点
Suspend Policies
Specifies whether to pause the program execution when the breakpoint
is hit.Non-suspending breakpoints are useful when you need to log some
expression without pausing the program (for example, when you need to
know how many times a method was called) or if you need to create a
master breakpoint that will enable dependent breakpoints when hit.The following policies are available for the breakpoints that suspend
program execution:All: all threads are suspended when any of the threads hits the
breakpoint.Thread: only the thread which hits the breakpoint is suspended.
If you want a policy to be used as the default one, click the Make
default button.
如何删除 idea 的缓存
~/Library/Caches/JetBrains/IntelliJIdea2021.2/caches
JPS增量注释处理已禁用.部分重新编译的编译结果可能不正确
在IntelliJ IDEA中运行应用程序时发出警告:
JPS incremental annotation processing is disabled. Complilation
results on partial recompilation may be inaccurate.由于IDEA的构建是增量式的,因此它使用包装器接口来收集一些数据,这些数据将有助于增量式分析来正确地编译受更改影响的文件.
-Djps.track.ap.dependencies = false 选项(如果添加到以下位置):
文件|设置/首选项|构建,执行,部署|编译器|构建流程VM选项字段将禁用在调用Filer方法时由注释处理器指定的依赖项的收集.
在更高版本的IntelliJ中,该设置现在位于:
文件|设置|构建,执行,部署|编译器|共享的构建过程虚拟机选项
remote
先让机器能够对 vscode remote:
1 |
|
1 |
|
使用公钥有可能会有断行问题,最好使用echo "ssh-rsa xxx abc@company.com" >> authorized_keys
来拷贝。拷贝完以后不需要systemctl restart sshd
也可以让 ssh 进程生效。
拥有这个 ~/.ssh/config
以后就可以使用 vscode 远程开发了。
在确认公私钥以后,在 idea 的远程里新建
在这个例子里,要注意私钥可能有多个,一定要选机器上已经authorized_keys里有的公钥对应的私钥!
完成以后,在远端 clone一个 git repo,然后在本端完成 project workspace 的选择-而不是选择工具上传的位置。