Debugging Step into my code and other actions Intermittent / inconsistent.


Community Edition 2017.1

  • Windows 10
  • VMware Virtual Machine
  • Breakpoints work as expected
  • Some code I can step through some I cannot.
  • I cannot find a pattern regarding types of code, structure etc.where it works/ where it doesn't.
  • The same file on another computer debugging works fine.


Comment actions Permalink

Hi! Please, provide a code sample for reproducing the issue.

Comment actions Permalink

Set break points at 10 and 15.

  1. Click Step in or Step into my code. Debug stops at line 15 as I expect.
  2. Click Step in or Step into my code.
  3. The prompt appears in the Console: a Enter 5
  4. The prompt appears in the Console: b Enter 8
  5. The prompt appears in the Console: c Enter -2
  6. Debug stops at line 15 as I expect.
  7. Debug stops at line 10 as I expect. Debugger window displays my variables. Console window displays my input.
  8. Click Step into my code. 

Console window displays:

0.2198039027185569 -1.8198039027185569

Process finished with exit code 0

I expected debugger to step to line 11 and display the value of disc. I also expected to be able to then step through lines 11, 12 etc. and see the values of root1 and root2.

 At step 8 if I click Step Into instead of Step into my code, I can step through 11-13.

import math

class Solver:
def demo(self):

a = int(input("a "))
b = int(input("b "))
c = int(input("c "))
d = b ** 2 - 4 * a * c
disc = math.sqrt(d)
root1 = (-b + disc) / (2 * a)
root2 = (-b - disc) / (2 * a)
print(root1, root2)


I am new. My expectations are based on other debuggers. So, I may have the wrong expectations. Maybe I just don't understand when to use step into and when to use step into my code.

Comment actions Permalink

@C9tyndall Yes, after "Step into my code" it should go to line 11, you're right. "Step into my code" works similar to "Step into", but it skips library files and stops inside user's code. 
So, it looks like a bug, but, unfortunately, I can't reproduce it. What operation system and Python interpreter do you use?

Comment actions Permalink

OS = Microsoft Windows Version 1607 (OS Build 14393.1066)

Python 3.6.1

PyCharm 2017.1.1
Build #PY-171.4163.6, built on April 11, 2017
Licensed to PyCharm Evaluator
Expiration date: May 16, 2017
JRE: 1.8.0_112-release-736-b16 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0


Please sign in to leave a comment.