Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use vscode to debug python code under mac

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article is about how to use vscode to debug python code under mac. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.

Problem: after downloading the python extension, you still cannot debug the code at a single point

Reason: no configuration

The configuration is as follows:

1. Open the settings of vscode, search for python.pythonPath, and configure python according to the path. You can enter your own according to the path in the terminal.

Which python3

Fill in the following figure:

2. Go to lunch.json configuration

Click 1 in the following figure, then click 2, and then add as shown in the box in 3. For ease of pasting, add the configuration below:

{"name": "Python: currenfile", "type": "python", "request": "launch", "program": "${file}", "console": "integratedTerminal"}

3. At this point, complete, select your configured currentfile in figure 2 above, click the ▶️ icon in figure 2 above to execute, and you can debug the breakpoint.

Thank you for reading! On how to use vscode to debug python code under mac is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report