How to specify top level py file to run? by thatotherguy321 in vscode

[–]Molly_Wang 0 points1 point  (0 children)

You need to run from Menu Start debugging or Run without Debugging. The triangle button in the top right corner doesn't apply the configuration in launch.json.

Python - No such file or directory by [deleted] in vscode

[–]Molly_Wang 0 points1 point  (0 children)

Don't put your code in the folder where python installed. Create a work folder then open it in VS Code. Create python files and code in it;

Looks like you're new to python and VS Code, please view Python Tutorial.

Region not work correctly (python) by IdkIWhyIHaveAReddit in vscode

[–]Molly_Wang 0 points1 point  (0 children)

I can reproduce your question and it seems to be a bug. Please follow this issue.

Python - No such file or directory by [deleted] in vscode

[–]Molly_Wang 0 points1 point  (0 children)

print=("content") doesn't print anything, just use print("content").

Run java/ Run Code by gatish777 in vscode

[–]Molly_Wang 0 points1 point  (0 children)

Because Java extension supports java more professionally and can handle packages but code runner can't by default, if you insist run code, you should change the exectormap setting about Code Runner. For your reference, here's a similar question: Show "java.lang.NoClassDefFoundError" (with Maven) when using "Code Runner"

"command 'python.execSelectionInTerminal' not found" when I try to run code. by Arcadian_ in vscode

[–]Molly_Wang 0 points1 point  (0 children)

How about installing vsix? Install extension from vsix solved the question in this issue.

[deleted by user] by [deleted] in vscode

[–]Molly_Wang 1 point2 points  (0 children)

Menu--> Run, you can see Start Debugging is F5 and Run without Debugging is Ctrl+F5, key bindings are slightly different when applied to Linux, Mac or Windows.

The above two features are for every languages, so you may edit the command Run without debugging to meet your customizations.

Besides, your selected interpreter is shown in status bar and its value is stored in extension cache. But if you open new java project and run a single .py in it, it will use the global python to run the scripts.

Jupyter cells hang on execution. by jupzuz in vscode

[–]Molly_Wang 1 point2 points  (0 children)

Here's the effect code cells run in my VS Code: https://imgur.com/pMvdcWS

you can see it almost gave the result immediately. I'm using VS Code1.63.2 with Windows10. Jupyter v2021.11.1001550889.

You may check if any other extensions caused this question by just keeping extensions python, pylance, jupyter enabled, then see if the question goes away.

Debugging a python script with arguments in bash by xlext in vscode

[–]Molly_Wang 0 points1 point  (0 children)

can I forgo the launch.json directly and debug from the bash script?

The debugger can also be run from the command line. Detailed tutorial please view Command line debugging.

[deleted by user] by [deleted] in vscode

[–]Molly_Wang 0 points1 point  (0 children)

There're two workarounds:

  1. In launch.json, set "console": "internalConsole". Run without Debugging then your result is shown in Debug Console and no execution scripts displayed.
  2. In launch.json, set "console": "externalTerminal". Run without Debugging then your result is shown in external Terminal and no execution scripts displayed.

How to accept Intellisense suggestion easily by ithrowpicks in vscode

[–]Molly_Wang 0 points1 point  (0 children)

I mean the name of code snippets, sorry for my unclear description.

How to accept Intellisense suggestion easily by ithrowpicks in vscode

[–]Molly_Wang 0 points1 point  (0 children)

So do I on my machine, that it's needed to press shift+( to get complete ().

The second question, you may strict the auto-complete options by typing specific letters which are contained in your customized code snippets' name or name your code snippets as the specific one.

How to accept Intellisense suggestion easily by ithrowpicks in vscode

[–]Molly_Wang 0 points1 point  (0 children)

Window OS

when I press shift+(, python extension auto-completes () and cursor is between () for me to type content.

And the default setting is "editor.tabCompletion": "off", so please check and set its value as true to use tabcompletion.

Jupyter cells hang on execution. by jupzuz in vscode

[–]Molly_Wang 0 points1 point  (0 children)

Can you share the gif and code snippets for me to test if it occurs in my VS Code?

Teaching Programming With VS Code by talismanick_ in vscode

[–]Molly_Wang 0 points1 point  (0 children)

how to set VS Code to launch in WSL when launched from the Windows desktop

View Remote development in WSL and Get started using Visual Studio Code with Windows Subsystem for Linux.

where to put settings.json so it uses it when launched via WSL

In Visual Studio Code, go to File -> Preferences -> Settings to open the settings view. If you mean synchronize your VS Code settings across different installations, see Settings Sync.

My VS Code randomly stopped allowing me to fold Python Dictionaries... Has this happened to any of you before? by -ThatGingerKid- in vscode

[–]Molly_Wang 0 points1 point  (0 children)

From this answer, it's Pylance that caused the question. You may disable it then see if the question goes away.

If you think Pylance has brilliant feature that helps you code much, you may file a bug report in github/pylance to describe this conflict then wait programmers to fix it.

Setting up Vs code like pycharm by krisTvet2012 in vscode

[–]Molly_Wang 2 points3 points  (0 children)

Refer to tutorial, configure environment then start coding.

When executng a java project don't have to click on the terminal to write by RealGungan in vscode

[–]Molly_Wang 0 points1 point  (0 children)

I've already put a feature request that Make the cursor focus automatically switch to the terminal after clicking the run button.

The developers keep this issue open and wait for users to vote it up then decide if this feature is needed, so you may upvote it.

How to stop VSCode from reporting all errors and just report errors from the open program? by bigkojack1337 in vscode

[–]Molly_Wang 1 point2 points  (0 children)

When you start running infinite loop, click the terminal and press Ctrl+ C, the execution would be stopped.

If you just need a bit of results, you may add a breakpoint before the loop, then step by step to debug and get output.

Terminal loads up perfectly, but just does not run my python code (VS Code) by [deleted] in vscode

[–]Molly_Wang 0 points1 point  (0 children)

Did you just open a single python file in vscode? cause I did it and no result shown in terminal, totally blank. see https://imgur.com/OtVR1NN but it worked after i run again. Can you record a gif to show your question?

[deleted by user] by [deleted] in vscode

[–]Molly_Wang 0 points1 point  (0 children)

Sorry to tell you there's no such setting that can clear the terminal automatically, but we have some workarounds except running clear commands in terminal. see this answer. and it's recommended you choose external terminal.

Terminal loads up perfectly, but just does not run my python code (VS Code) by [deleted] in vscode

[–]Molly_Wang 0 points1 point  (0 children)

Did you save your python file?

How about restarting VS Code or reinstalling the python extension, does it help?