python 常用快捷键vscode
时间: 2023-12-23 16:28:28 浏览: 36
以下是一些常用的VSCode快捷键:
1. 打开命令面板:Ctrl + Shift + P
2. 保存文件:Ctrl + S
3. 撤销:Ctrl + Z
4. 重做:Ctrl + Shift + Z
5. 复制:Ctrl + C
6. 剪切:Ctrl + X
7. 粘贴:Ctrl + V
8. 查找:Ctrl + F
9. 替换:Ctrl + H
10. 全局查找:Ctrl + Shift + F
11. 全局替换:Ctrl + Shift + H
12. 跳转到定义:F12
13. 跳转到声明:Ctrl + 左键点击
14. 跳转到上一个光标位置:Ctrl + -
15. 跳转到下一个光标位置:Ctrl + Shift + -
16. 代码格式化:Shift + Alt + F
17. 注释代码:Ctrl + /
18. 取消注释:Ctrl + /
19. 代码折叠:Ctrl + Shift + [
20. 代码展开:Ctrl + Shift + ]
这些是一些常用的快捷键,可以帮助提高在VSCode中的开发效率。
相关问题
python main函数快捷键
在VSCode中,可以使用Ctrl+Shift+P或F1打开命令面板,然后输入"Python: Run Python file in terminal"来运行Python主函数。此外,你还可以使用Ctrl+Shift+D打开调试面板,在调试面板中点击运行按钮来运行Python主函数。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [VScode编写Python快捷键,建议收藏](https://blog.csdn.net/xiaofeixia666888/article/details/111354127)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [python之常用快捷键](https://blog.csdn.net/qq_42158153/article/details/125306798)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
vscode调试快捷键
以下是VSCode调试常用快捷键:
1. 启动/停止调试:F5
2. 单步执行:F10
3. 跳过当前代码行:F11
4. 跳入当前代码行:F11
5. 继续执行:F5
6. 在调试控制台中运行代码:CTRL + SHIFT + P,然后输入“Debug: Evaluate Expression”
7. 在调试控制台中查看变量的值:将光标放在变量上,然后按CTRL + SHIFT + P,然后输入“Debug: Inspect Variable”
8. 在调试控制台中查看函数的返回值:在函数调用后按CTRL + SHIFT + P,然后输入“Debug: Evaluate Call Stack Expression”
```python
def add(a, b):
return a + b
result = add(2, 3)
print(result)
```
在上面的代码中,如果想要查看add函数的返回值,可以在函数调用后按CTRL + SHIFT + P,然后输入“Debug: Evaluate Call Stack Expression”,然后输入“add(2, 3)”即可查看返回值。
相关推荐
![md](https://img-home.csdnimg.cn/images/20210720083646.png)
![json](https://img-home.csdnimg.cn/images/20210720083646.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)