Coder Social home page Coder Social logo

Comments (6)

Agnpalm avatar Agnpalm commented on June 14, 2024 3

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.

from vscode-python.

DonJayamanne avatar DonJayamanne commented on June 14, 2024 1

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

from vscode-python.

DonJayamanne avatar DonJayamanne commented on June 14, 2024

@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.

from vscode-python.

Agnpalm avatar Agnpalm commented on June 14, 2024

@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.

from vscode-python.

DonJayamanne avatar DonJayamanne commented on June 14, 2024

@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.

da1z avatar da1z commented on June 14, 2024

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

from vscode-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.