I have a PHP script which runs via Windows Task Scheduler. When it starts it automatically opens a console window where the script writes status messages. If I click on this window it stops the script running. The window is still opened but it seems the script does not work. The window does not disappear. I don't understand why it happens. How can I see any errors from the script or what it is doing.

1 Answer 1


The Windows 10 command prompt pauses when you click so that you can copy and paste text without that text changing or moving. You can escape this copy mode by simply right clicking in the console window.

Whether or not this will pause the commands running in the command prompt depends on the commands you're running. Generally it seems that commands writing output to the console will pause, whereas commands writing output to a log file will not.

To stop the command prompt from pausing:

  1. Right click on the title bar at the top of the console window.
  2. Click Properties.

    enter image description here

  3. Click the Options tab.

  4. Uncheck Quick Edit Mode.

    enter image description here

Once you've made this change, you can no longer easily copy from the console. In order to copy you will need to:

  1. Right click on the title bar at the top of the console window.
  2. Highlight Edit.
  3. Click Mark.

    enter image description here

  4. Highlight your selection.

  5. Right click to copy.
  • Thanks. But what does the script doing while console is in copy mode? Is it continuing or it is stopped at all?
    – Čamo
    May 30, 2019 at 15:30
  • It seems to depend on what you're running. ping and robocopy both pause if the output is going to the console, but continue if the output is piped to a log file. I'm not sure if that applies to PHP scripts since I don't have it available on this computer to test.
    – Worthwelle
    May 30, 2019 at 15:49
  • It depends on script and things. If print operation is blocking - script stops. You may check that trying to print timestamps sequentially
    – Maximus
    May 30, 2019 at 15:50
  • While the user is interacting with the console's output in the UI any code that tries to write to the console's output stream will be blocked. Aug 6, 2021 at 13:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .