Comments (6)
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.
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.
from vscode-python.
We haven't released a new version yet, Please wait for the next release, we plan on releasing something next week.
from vscode-python.
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.
from vscode-python.
@DonJayamanne sure:
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:
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.
from vscode-python.
@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.
from vscode-python.
I still have this issue on Mac OS. Run without debugging does not work for second time.
from vscode-python.
Related Issues (20)
- support REPL input
- support file association for REPL
- enable `interrupt` for currently executing code in REPL HOT 2
- Python: Iteration Plan for May 2024 HOT 1
- vscode terminal crashes when python extension is enabled HOT 6
- Handle no interpreter option for IW REPL HOT 2
- Problems with new setting to remember Python interpreter for project HOT 3
- Pytest: Display path different from real path HOT 6
- Virtual environment from a previous workspace activated in a new workspace that I opened HOT 2
- Violacion de segmento HOT 6
- Pytest discovery is not corretly displyed in the UI HOT 1
- conda activate from subprocess HOT 6
- Orphan / isolated extension HOT 1
- Gitbash HOT 1
- Gitbash terminal not opening to workspace folder. HOT 12
- 'Run python file' doesn't work in Git Bash HOT 3
- Success/Fail Test Checkmark Reference wrong after Command-Z is used. HOT 3
- V2024.6.0 unable to test HOT 10
- Unable to restart tests (KeyError: 'params') HOT 4
- add ${workspaceFolder} to "PYTHONPATH" in launch.son by default HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-python.