Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Pycharm debug mode, what is the difference of " step into my code" and "step into"

In Pycharm debug mode, when I use the "step into" and "step into my code", they both run the program line by line. So I wonder that is there any difference between these two functions?

like image 817
OceanicSix Avatar asked Oct 02 '17 03:10

OceanicSix


People also ask

What is step into and step over in debugging?

Ans: Step Into: Step Into is used for debugging the test steps line by line. When the procedure gets called, Step Into enables you to get inside the procedure and debugs the procedure steps line by line. Step Over: Step Over will enable, only after the debugging is started with Step Into / Run From Step / Run to Step.

What does step into mean in debugging?

Step into – An action to take in the debugger. If the line does not contain a function it behaves the same as “step over” but if it does the debugger will enter the called function and continue line-by-line debugging there.

Under what circumstances do step into and step over do the same thing in the PyCharm debugger?

PyCharm step into, step over have same effect as Resume Program when virtual paths are in use. Open any working project or create a new project with single python module. Execution stops at breakpoint, as expected. Hit Step Over and program will continue to next breakpoint.

What does it mean to step into or step out of a function?

"Step into" will stop on the first executable line inside the function. Note, if you have optimisation enabled, the "first executable line" may not be the one you expect. 8/15/2021. 1and0. There is also a "Step Out" allowing you to step out of a function which you are currently stepping through.


1 Answers

"Step into" runs through all code in your project including imported libraries, etc.

Whereas "Step Into My Code" skips over library sources and keep focused on your own code.

Step into My Code

Use Step into My Code to stay focused on your code: the debugger will only step through your code bypassing any library sources.

https://www.jetbrains.com/pycharm/features/tools.html

If you want to concentrate on your own code, use the Step Into My Code button - thus you'll avoid stepping into library classes.

https://www.jetbrains.com/help/pycharm/step-2-debugging-your-first-python-application.html

like image 91
chickity china chinese chicken Avatar answered Sep 29 '22 01:09

chickity china chinese chicken