JetBrains
PyCharm
Install
Debug
多线程

备注
假定有线程A,B。当给线程A对应的函数加断点时,执行到断点时会跳转到该线程进行断点调试;此时线程A虽然阻塞,但线程B能够继续被执行下去。若此时再给B对应部分加断点,线程B也会阻塞。
前台进程
对一个正在运行的程序进行debug:attach后可像debug模式下在程序对应位置上打断点
Performance
The current inotify watch limit is too low
sudo sysctl fs.inotify.max_user_watches=524288
Tool
Proxy
Matplotlib
Profile

External tools
需要装在系统中,否则要写可执行文件的绝对路径
Programs: autopep8
Arguments: --in-place --aggressive --aggressive $FilePath$
Working directory: $ProjectFileDir$
Output filters: $FILE_PATH$\:$LINE$\:$COLUMN$\:.*
isort

black
Programs: black
Arguments: $FileDir$/$FileName$
Working directory: $ProjectFileDir$
Deployment
屏蔽某些需要同步的文件和文件夹
方法一:
方法二:

方法三:
remote host
界面中对相关文件和文件夹,右键exclude path
Interpreter
添加额外的库搜索路径

Smart key
自动补加
self
生成document时是否添加
type
View
滚轮缩放界面字体

只显示已打开文件所对应的文件夹
查看异同
可视化界面

命令行
where path_1 and path_2 are paths to the folders you want to compare.
<path to PyCharm executable file> diff <path_1> <path_2>
切换缩进方式
Edit | convert indents / 或使用Action
设置文档类型
rst文档格式

Epytest文档格式
CLion
Install
Debug
前台进程
ROS
Valgrind
Perf
安装
安装 perf
suto apt install inux-tools-$(uname -r)
调整内核选项(以获取调试信息),以下选项的设置为永久生效
sudo sh -c 'echo kernel.perf_event_paranoid=1 >> /etc/sysctl.d/99-perf.conf'
sudo sh -c 'echo kernel.kptr_restrict=0 >> /etc/sysctl.d/99-perf.conf'
sudo sh -c 'sysctl --system'

Performance
提高IDE性能
包括增加可用内存、提高代码解析和索引的速度、关闭不必要的插件
Edit
Template

Head Comment
Naming

Tool
Toolchains
自定义工具链(用什么generator,compiler,debugger)
配置cmake编译参数
Doxygen
View
ANSI
CLion的终端无法显示ANSI:正常,CLion的console不是终端,暂时不支持ANSI渲染
Docker
Plugin
插件名 |
功能 |
---|---|
Awesome console |
触发单击文件链接以打开文件 |
OpenCV Image Viewer |
|
CodeGlance3 / CodeGlance Pro |
代码缩略图(类似vscode右侧浏览栏) |
Rainbow Brackets |
高亮括号 |
Github Copilot |
代码AI补全 |
.ignore |
导入ignore文件模板 |
Shortcut
Selection
作用 |
快捷键 |
---|---|
expand current selection |
ctrl+w / (redo) ctrl+shift+w |
column selection |
ctrl+shift+insert |
Refactor
作用 |
快捷键 |
---|---|
修改签名 |
ctrl+6 |
修改变量名 |
shift+F6 |
Edit
作用 |
快捷键 |
---|---|
replace in path |
c+r |
replace in files(可设置File mask) |
c+s+r |
Code Complete(偏向语法上的补全) |
c+s+enter |
选择性粘贴 |
c+s+v |
代码块折叠与展开 |
c+"+/-" / c+s+"+/-" |
live template |
c+j |
surround template |
ctrl+alt+a(custom) / c+a+j |
Comment Position