Pycharm的运行应用

节选自Pycharm官方文档:http://www.jetbrains.com/pycharm/quickstart/index.html


Run and Debug Your Application

Quickly run your python application

While working with PyCharm, you'll come to a moment when you need to run or debug an application, a script, or a test. In all these cases, you need a special profile, or a run/debug configuration, which defines script name, working directory, environment variables, and other vital things.

Integrated Python Console

For each of the elements that can be run, there is a default profile, and you can easily launch such an element from its context menu, or with a handy shortcut Ctrl+Shift+F10 . However, if you want to use some other run/debug configuration, you have to choose one on the main menu, and then press Shift+F10.

PyCharm also helps those who love the full control of an interactive console: on the Tools menu, you can find commands that launch the interactive Python or Django consoles. Here you can type commands and execute them immediately. Moreover, PyCharm's interactive consoles feature syntax highlighting, code completion, and allow scrolling through the history of commands (Ctrl+Up/Down).

Python debugger with breakpoints

Oops... your application or script runs into a run-time error? To find out its origin, you will have to do some debugging. It starts with placing breakpoints (quite simple - just click the left gutter of the line where you want the breakpoint to appear), at which program execution will be suspended, so you can explore program data:

Launching the debugging session is quite as simple: either use the context menu of a specific script, or select a suitable run/debug configuration, and then press Shift+F9 .

And finally, a very convenient way to select run/debug configuration and immediately launch it isAlt+Shift+F10Alt+Shift+F9.

  Ctrl+Shift+F10 就可以快速切换主程序,方便运行
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值