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

Not working Ctrl+F5 for a second time #25

Closed
warpuv opened this issue Nov 10, 2017 · 6 comments · Fixed by #249
Closed

Not working Ctrl+F5 for a second time #25

warpuv opened this issue Nov 10, 2017 · 6 comments · Fixed by #249
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug
Milestone

Comments

@warpuv
Copy link

warpuv commented Nov 10, 2017

Nothing happened when you run simple hello world script for a second time without debugging.


  • VSCode Version: Code 1.18.0 (dcee2202709a4f223185514b9275aa4229841aa7, 2017-11-08T21:19:36.079Z)
  • OS Version: Windows_NT ia32 10.0.16299
  • Extensions: python|ms-|0.8.0

@Agnpalm
Copy link

Agnpalm commented Nov 10, 2017

When I open a Python file without opening a folder I get the error

Cannot read property 'openConfigFile' of undefined

when I try to run a file through ctrl+F5. If I instead open the folder where the file is and press ctrl+F5 VS Code opens a launch.json-file. After I've saved that and press ctrl+F5 again, there's a progress bar in the debug activity bar, but the code doesn't seem to run. I can't find a way to stop the progress bar other than restart VSCode.
image

If I instead press F5 to run with debugging the debug bar appears, and the program is stopped. If I press F5 for continue the code runs and exits as expected. This works again and again, at least until I press ctrl+F5 again.

After pressing ctrl+F5 and the progress bar is active pressing F5 does nothing, but selecting and running a debug configuration from the status bar does start the debugger again. After finishing the progress bar is still active though.

All this is using a one line program, print('Hello world')

As a workaround you can bind python.execInTerminal to something, or run Python Run in terminal from the command palette.

Hopefully now that Microsoft have hired @DonJayamanne (congrats!) and made this an official extension they will make it a priority to make it easy to run Python scripts without having a working folder or installing more extensions like Code runner.

@DonJayamanne
Copy link

@Agnpalm

Cannot read property 'openConfigFile' of undefined

Please could you provide a screenshot of the above error.
Also, please could you provide the details of your OS and Python Version.

@Agnpalm
Copy link

Agnpalm commented Nov 15, 2017

@DonJayamanne sure:

image

Windows version: Microsoft Windows [Version 10.0.16299.19]
Python version: 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:57:36) [MSC v.1900 64 bit (AMD64)]

From the developer console:
image
The last error is from running Start without debug (Ctrl+F5), the others are there when opening a .py file. Except the Python 0.8.0 extension the only other extension installed is the Jupyter 1.1.4. This is a fresh install.

@DonJayamanne
Copy link

@Agnpalm The error 'openConfigFile' of undefined is a VS Code issue (#38674). However not being able to run without debugging is specific to this extension.

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
@da1z
Copy link

da1z commented Dec 6, 2017

I still have this issue on Mac OS. Run without debugging does not work for second time.

@DonJayamanne
Copy link

DonJayamanne commented Dec 6, 2017

We haven't released a new version yet, Please wait for the next release, we plan on releasing something next week.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants