Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discuss the need for the prompt at the end of the execution of a program #239

Closed
DonJayamanne opened this issue Nov 16, 2017 · 4 comments · Fixed by #249
Closed

Discuss the need for the prompt at the end of the execution of a program #239

DonJayamanne opened this issue Nov 16, 2017 · 4 comments · Fixed by #249
Labels
feature-request Request for new features or functionality
Milestone

Comments

@DonJayamanne
Copy link

@brettcannon
At the end of program execution (while debugging) we display the prompt Press any key to continue...' I've only added this as PTVS does the same thing (i.e. wanted to be consistent). However I think PTVS does it because the terminal gets closed once you hit the Enter` key, i.e. you can't see the output).

Personally I don't see the need for this in VS Code.
Reason is when you execute a simple program such as print("hello world"), the program doesn't end until you hit the enter key (except when debugging using the standard vscode debug console). I.e. everytime you run a simple program, you have to hit the Enter key (more key presses).

Here's an example:

PS C:\git\python> cd 'c:\git\python'; $env:PYTHONIOENCODING='UTF-8'; $env:PYTHONUNBUFFERED='1'; c:/python36/python C:\Users\...\.vscode-insiders\extensions\ms-python.python-0.8.0\pythonFiles\PythonTools\visualstudio_py_launcher.py c:\git\python 50640 34806ad9-833a-4524-8cd6-18ca4aa74f14 WaitOnAbnormalExit,WaitOnNormalExit c:\git\python\HelloWorld.py
Hello, world!
Press any key to continue . . .
@DonJayamanne
Copy link
Author

Problem reported in #191

Program debugs in terminal (either integrated or external) and a prompt not in the source appears when the program is finished:

Press any key to continue . . .

@brettcannon brettcannon added awaiting 2-PR feature-request Request for new features or functionality labels Nov 16, 2017
@DonJayamanne DonJayamanne added this to the December 2017 milestone Nov 17, 2017
DonJayamanne added a commit that referenced this issue Nov 22, 2017
#249)

- Fixes #25, #32, #35, #235, #242 (unable to run without debugging using CTRL+F5)   
- Fixes #191, #158, #24, #136  (error message displayed when debugged code terminates)  
- Fixes #157 (debugger crashes when python program does not launch)
- Fixes #114, #149, #250 (use vscode infrastructure to launch debugger in integrated and external terminals)  
- Fixes #239 Remove prompt added to pause terminal upon program completion
@ghost
Copy link

ghost commented Jan 23, 2018

Hi. All issues are closed. But #159 is reproduced in 1.19.2.

VSC ver:
image

configuration for running the python script:

{
            "name": "run.py",
            "type": "python",
            "request": "launch",
            "stopOnEntry": true,
            "pythonPath": "${config:python.pythonPath}",
            "program": "${workspaceFolder}/run.py",
            "cwd": "${workspaceFolder}",
            "env": {},
            "envFile": "${workspaceFolder}/.env",
            "debugOptions": [
                "RedirectOutput"
            ]
}

error in dbg window:
image

python script: a loop with HTTP requests in Process(parallel requests) and output to the console for each HTTP request (print ("some information about the response"))

@DonJayamanne
Copy link
Author

@tav0x222 please could you create a separate issue with details and a sample to replicate the issue.

@ghost
Copy link

ghost commented Jan 24, 2018

@DonJayamanne #618

@lock lock bot locked as resolved and limited conversation to collaborators Jul 12, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants