7

The pdb Debugger has a nice feature:

  • r(eturn) Continue execution until the current function returns.

This is handy if a method has several return statements.

With this feature you can see where the method would get left, but you still see which return statement gets used.

The pdb Debugger stops at a code line like this:

    return foo

I could not find this feature in PyCharm.

Is it available, or it this a feature request?

guettli
  • 25,042
  • 81
  • 346
  • 663
  • It seems that you want to stay in the method. The usual thing would be "step out", which stops after the function returned (stops in the parent method) – Thomas Weller Dec 19 '17 at 12:44
  • @ThomasWeller yes, I updated the question to make this more clean. – guettli Dec 19 '17 at 14:53
  • Since there is no answer, I guess this is a feature request and not me being blind. I created the feature request here: https://youtrack.jetbrains.com/issue/PY-27869 – guettli Jan 09 '18 at 05:51

1 Answers1

0

If knowing the return value is enough (without knowing which return statement was exactly triggered), you can try this:

  1. In the Debugger window click the cogwheel and make sure Show Return Values is checked.
  2. After you Step Out of the function, you'll see a new item in the Variables pane called Return Values, with the value returned.
OmerB
  • 4,134
  • 3
  • 20
  • 33
  • No, this is not engough. This question is about seeing the line where the return happens. I don't care for the return value. – guettli Jan 10 '18 at 15:16