简体   繁体   English

如何在vscode中正确调试Python?

[英]How to properly debug Python in vscode?

I am confused with the Run Selection/Line in Python Terminal command.Run Selection/Line in Python Terminal感到困惑。 In my VsCode (Windows 11).在我的 VsCode (Windows 11) 中。 I have two commands with the same shortcut Shift+Enter .我有两个命令具有相同的快捷方式Shift+Enter

One is launching an Interactive Jupyter notebook (awful).一个是启动交互式 Jupyter 笔记本(糟糕)。 The other sends it to a Python Terminal (better).另一个将它发送到 Python 终端(更好)。 My ideal case would be to send it to an Ipython terminal.我的理想情况是将它发送到 Ipython 终端。

How to configure that properly?如何正确配置?

在此处输入图像描述

Could you try this?你能试试这个吗?

"terminal.integrated.defaultProfile.windows": "IPython",

"IPython": {
  "path": "C:\\Work\\python3.10\\.venv\\Scripts\\ipython.exe"  //The path to the ipython.exe, please take care of which ipython you have selected, this means which python interpreter selected in the terminal.
},

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM