PyCharm Debugger Step into my code (Alt+Shift+F7) does not move to the next line of my code but to the next breakpoint immediately

My issue is something similar to



When i ran the debugger, it stops at the breakpoint at line 32 as expected. But when I click the step into my code line, I would expect the debugger to move to the next line which is line 33. However, the debugger jumps to the end of the script (or next breakpoint if there is one). The other buttons on the left, step into, steps into any code from any imported libraries which is not what I want. I have PyCharm installed on another laptop and the step into my code works as expected. I have updated my PyCharm to the latest version and this problem still persists. Any help is greatly appreciated! Thank you!




- Does the issue reproduce on any arbitrary code, or only specific one?

- You've mentioned that issue is not reproduced on another laptop, does it have similar setup? Have you tried the same code?

- Does the issue reproduce if you create a new project with a new interpreter/virtual environment?


Dear Andrey,

1. Yes, this issue that occurs on my laptop happens for any projects I open, before and after I updated PyCharm.

2. Yes, I use the same project and scripts on both laptops as one is located in school and another at home. The other laptop that works is also in the same version of PyCharm and runs the same code (as I store my code in Github) but without the bebugger issue. The only difference I can tell is that the symbol for the debugger looks different and I have no idea why.

3. For the laptop with the issue, I have switched the project interpreter and the project itself but the issue still occurs. I think it is PyCharm itself that has this problem...


Thank you!


Are using different PyCharm versions between two laptops?

Do you use scratch files by any chance? (we have a known issue that debugger skip lines in scratch files


Dear Andrey,

I will not be in school for the weekends and hence has no access to my laptop with this issue.

However, the outcome, according to the link you sent, is that the laptop would jump from line 1 to line 3. But I am not sure what does a scratch file mean.


Please see the following:

If you're using scratches, that would explain it. 


I don't think I am using scratch files since:

1. The only files I have created are by right-clicking the project folder and selecting a New Python File.

2. My second laptop runs the exact same python script with no issues.



Hi, sorry for delayed response.

How about we try to reset PyCharm to a clean slate and try to reproduce the issue again? That would tell us if the issue is caused by some settings or corrupted config. To do that:

1. Export your settings and close PyCharm

2. Delete PyCharm config directory, which can be located according to

3. Also delete the `.idea` directory in project root

4. This will make PyCharm start with the default settings. Open the project you were working on, do a minimal interpreter configuration, and try to reproduce the issue.

5. You can import the settings back, and try to reproduce the issue again, depending on the result of the previous step.

If the issue is still reproduced either way, please provide logs (, and specify which project interpreter you are using and how do you configure it.


Please sign in to leave a comment.