网络编程
位置:首页>> 网络编程>> 网络编程>> 在pycharm中debug 实时查看数据操作(交互式)

在pycharm中debug 实时查看数据操作(交互式)

作者:zxfhahaha  发布时间:2023-01-19 08:31:11 

标签:pycharm,debug,数据,交互式

用pycharm进行debug

① 直接在代码中设断点(点击代码的左边)

在pycharm中debug 实时查看数据操作(交互式)

②右击点击debug

在pycharm中debug 实时查看数据操作(交互式)

有几种debug方式,我们可以在pycharm的下方中的debugger进行选择

在pycharm中debug 实时查看数据操作(交互式)

①step over 单步运行

即一行一行代码运行

在pycharm中debug 实时查看数据操作(交互式)

②step into

在pycharm中debug 实时查看数据操作(交互式)

③ step into my code 跳到函数中运行

在pycharm中debug 实时查看数据操作(交互式)

交互式查看结果

在pycharm中debug 实时查看数据操作(交互式)

第一步:点击pycharm下方的console

第二步:点击show Python plompt

这样就可以看到交互式界面啦

然后我们直接输入变量就可以查看结果了

停止debug就点击最左边一栏的红色方框即可

补充知识:pycharm 不调试也可以查看变量

pychrm右上角,当前程序下拉菜单,选择 编辑配置

在pycharm中debug 实时查看数据操作(交互式)

勾选 用控制台运行

在pycharm中debug 实时查看数据操作(交互式)

再run就可以看到变量咯

在pycharm中debug 实时查看数据操作(交互式)

pycharm版本不同,有的人是勾选这个,具体自己根据意思去揣度,试错就行

在pycharm中debug 实时查看数据操作(交互式)

来源:https://blog.csdn.net/zxfhahaha/article/details/80146385

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com