JetBrains

PyCharm

Install

Debug

多线程

img

备注

假定有线程A,B。当给线程A对应的函数加断点时,执行到断点时会跳转到该线程进行断点调试;此时线程A虽然阻塞,但线程B能够继续被执行下去。若此时再给B对应部分加断点,线程B也会阻塞。

  • 可视化查看当前程序启动的线程数和线程状态(concurrency diagram)

  • img

前台进程

Performance

The current inotify watch limit is too low

sudo sysctl fs.inotify.max_user_watches=524288

Tool

Proxy

Matplotlib

img

Profile

image-20210908211513561

External tools

img

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

img
  • black

Programs: black
Arguments: $FileDir$/$FileName$
Working directory: $ProjectFileDir$

Deployment

  • 屏蔽某些需要同步的文件和文件夹

方法一:

img

方法二:

img

方法三:

remote host 界面中对相关文件和文件夹,右键exclude path

Interpreter

  • 添加额外的库搜索路径

img

Smart key

  • 自动补加 self

  • 生成document时是否添加 type

View

滚轮缩放界面字体

img

只显示已打开文件所对应的文件夹

image-20210929103600049

查看异同

  • 可视化界面

img
  • 命令行

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

设置文档类型

img

  • rst文档格式

img
  • Epytest文档格式

img

CLion

Install

Debug

前台进程

ROS

Valgrind

image-20211002014651471

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'
image-20220214144648235

Performance

提高IDE性能

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

Edit

Template

image-20220222100921276

Head Comment

Comment Position

image-20220426100000489

Naming

image-20220304101835683

Tool

Toolchains

  • 自定义工具链(用什么generator,compiler,debugger)

image-20210815202103721

  • 配置cmake编译参数

    image-20210815202247964

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