Is the debugger's PAUSE button supposed to do the same thing during Run \ Run as during Run \ Debug ?

Greetings,

Is the PAUSE button in the debugger supposed to behave the same during a Run \ Run versus a Run \ Debug session?  I would have those so, but that does not appear to be the case with PyCharm version 1.0.1.

Say I have this code:

import time

for x in range(30):
    print x
    time.sleep(1)

print "done"

During a Run \ Run, the PAUSE button only appears to halt the display of output, not halt the actual program.  For example, run the above code.  When the console shows a 0 then 1 then 2.  After the 2 is displayed, single-left-click the PAUSE button so it appears "punched".  Wait 5 seconds.  No output goes to the console,  Now single-left-click the PAUSE button again so it is no longer punched in.  The console immediately writes 3, 4, 5, 6, 7, 8 and then each second outputs the next number.  Now single-left-click the Stop button.  Execution correctly stops.

During a Run \ Debug, for some reason I need to single-left-click the PAUSE button 3 times to get execution to halt, though the program does indeed appear to halt.  For example, run the above code as debug.  When the consoe shows a 2, single-left-click the PAUSE button.  For me, I then have to do another single-left-click of the PAUSE button, then a 3rd single-left-click of the PAUSE button.  At the point the console shows the numbers through 6.  The editor then correctly high-lights the line of code where execution paused.   Now wait 5-10 seconds, then single-left-click the PLAY button.  Execution resumes, outputing 7, then 8 (after another second), etc.  Now single-left-click the Stop button.  Execution correctly stops.

Should the Run \ Run behavior mirror the Run \ Debug behavior?  Is so, I'll write up a bug report in YouTrack.

Also, any thoughts on why I need to click the PAUSE button 3 times in a Run \ Debug to get code execution to PAUSE?  Am I doing something wrong, or is that a bug?

Cheers,

Rob

3 comments
Comment actions Permalink

According to the below linked thread I found from 2005 (5+ years ago!), it looks like the PAUSE button during a Run \ Run is only supposed to PAUSE the scrolling of output to the console, but pause program execution.

http://devnet.jetbrains.net/message/4978686

When I have some free time later this week, I'll:

  1. Add a YouTrack feature request to be able to pause program execution during a Run \ Run, not just pause the output to the console.
  2. Submit a YouTrack bug report about having to click the PAUSE button *3* times during a Run \ Debug to pause program execution.
0
Comment actions Permalink

Hello Rob,

According to the below linked thread I found from 2005 (5+ years

ago!), it looks like the PAUSE button during a Run \ Run is only

supposed to PAUSE the scrolling of output to the console, but pause

program execution.

http://devnet.jetbrains.net/message/4978686

When I have some free time later this week, I'll:

1. Add a YouTrack feature request to be able to pause program

execution during a Run \ Run, not just pause the output to the

console.

I don't think we will be able to implement this request. "Run" runs the program

without any intermediaries, and there is no way to suspend the execution

of an arbitrary running Python process from another process.

2. Submit a YouTrack bug report about having to click the PAUSE button

3 times during a Run \ Debug to pause program execution.

This does look like a bug.

--

Dmitry Jemerov

Development Lead

JetBrains, Inc.

http://www.jetbrains.com/

"Develop with Pleasure!"

0
Comment actions Permalink

Hello Dimitry,

2. Submit a YouTrack bug report about having to click the PAUSE button

3 times during a Run \ Debug to pause program execution.

This does look like a bug.

--

Dmitry Jemerov

Development Lead

JetBrains, Inc.

http://www.jetbrains.com/

"Develop with Pleasure!"

I submitted YouTrack as PY-2426 for having to click the pause button 3 times.  Below is a link.  Not certain if that issue exclusively effects just the PyCharm debugger or not, so I set the project to PyCharm not IDEA.

http://youtrack.jetbrains.net/issue/PY-2426

Cheers,

Rob

0

Please sign in to leave a comment.