第一部分:
完成博客练习:https://www.cnblogs.com/lijunjiang2015/p/7689822.html
回答以下问题:
- 启动pycharm调试模式的快捷键是?
- 调试模式下,从一个断点直接跳到另一个断点的快捷键是?
- 调试模式下,进入函数内部进行调试的快捷键是?
答案:
1. shift+F9
2. F9
3. F7
第二部分:
参考链接:https://blog.csdn.net/u011331731/article/details/72801449
示例:
样例程序
01 def helloworld():
02 print 'hello world'
03 a=1
04 b=2
05 c=3
06 for i in range(1,3):
07 print 'i',i
08 a=1
09 b=2
10 c=3
11 helloworld()
12 a=1
13 b=2
14 c=3
程序完整序列:3,4,5,6,7,6,7,8,9,10,11,2,12,13
F8:step over 单步,3,4,5,6,7,6,7,8,9,10,11,12,13
F7:step into 进入,3,4,5,6,7,6,7,8,9,10,11,2,11,12,13
F9:resume program 继续程序 到下一个断点
写出以下代码的三种序列
def hello():
return 'hello'
if __name__ == '__main__':
print('###' * 10)
print('###' * 10)
print('###' * 10)
print('###' * 10)
print('###' * 10)
print('###' * 10)
print('###' * 10)
print('###' * 10)
name = raw_input("Please input your name: ")
print(hello() + name)
print('###' * 10)
第三部分:debug实战
参考链接:https://blog.csdn.net/lanchunhui/article/details/49514297