Python Forum
Visual Studio-remove Output clutter
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Visual Studio-remove Output clutter
#11
Code Runner have a option to only show code output and nothing else.
Go into Settings now search for runner.
Scroll down to Code Runner: Show run command in editor context menu
Mark on.
Other setting that can be okay is to auto save and auto clear output window when run code.
So the with options it look like this in settings.json.
"code-runner.clearPreviousOutput": true,
"code-runner.showExecutionMessage": false,
"code-runner.saveFileBeforeRun": true,
"code-runner.runInTerminal": false
Reply
#12
closer.
its saving the file, clearing the output and there is no [running] or [done] or execution path or file now.

it was actually this setting that removed the exec path\file from output
Quote:"code-runner.showExecutionMessage": false,
If I leave this true and have
Quote:"code-runner.showRunCommandInEditorContextMenu": false,
alone it does not remove it from the output. ie they seem to be related with code-runner.showExecutionMessage overriding.

Quote:'\\ad.monash.edu\home\User094\symonds\Documents\Python-Exercises\Exercise Files'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
hello world!
today testrun 4

the UNC error persists.


I have also included the settings.json for coderunner
Quote:{
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"workbench.iconTheme": "vscode-icons",
"code-runner.executorMap": {


"php": "php",
"python": "$pythonPath $fullFileName",
"perl": "perl",

},
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"python.jediEnabled": false,
"code-runner.languageIdToFileExtensionMap": {

},
"code-runner.saveFileBeforeRun": true,
"code-runner.showExecutionMessage": false,
"code-runner.clearPreviousOutput": true,
}
Reply
#13
(May-13-2020, 06:12 AM)mds Wrote: the UNC error persists.
That's has more to do with that with cmd support for UNC paths,and not VS Code.
Also UNC path are network paths,so that's a path you point to.
\\ad.monash.edu\home\User094\symonds\Documents\Python-Exercises\Exercise Files
A local path has a drive letter is the more normal way to store Exercise Files python files.
Example:
C:\Python-Exercises\Exercise Files
UNC path may work or not deepening on setup network ect...
It work for me on my local setup at home,now do i use cmder but also work in cmd for me.
C:\code
λ python "\\Tom-pc1\e\div_code\humansize.py"
1.0 TB
931.3 GiB
Or in VS Code with "python": "$pythonPath $fullFileName",
Output:
[Running] C:\python37\python.exe "\\Tom-pc1\e\div_code\humansize.py" 1.0 TB 931.3 GiB [Done] exited with code=0 in 0.366 seconds
With "code-runner.showExecutionMessage": false,
Output:
1.0 TB 931.3 GiB
Reply
#14
I had the same issue while taking the same courses. This thread came up in my searches, but without much of solution. It turned out to be an easy fix.

in the launch.jason, change the following line
"console": "integratedTerminal"
to this.
"console": "internalConsole"
Now all I get is the output from the code just like the screenshots posted earlier. It shows up in the Debug Console instead of the Terminal, too.
Reply
#15
Hey shtoink thanks for the reply, (i been busy with soldiworks cad)
I gave your mod a try and I do believe its working yeah go team!
Ill run thru some more stuff(I have to remember how it wall works again) to be sure but it looks good

(Jun-01-2020, 06:14 PM)shtoink Wrote: I had the same issue while taking the same courses. This thread came up in my searches, but without much of solution. It turned out to be an easy fix.

in the launch.jason, change the following line
"console": "integratedTerminal"
to this.
"console": "internalConsole"
Now all I get is the output from the code just like the screenshots posted earlier. It shows up in the Debug Console instead of the Terminal, too.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to set PYTHONPATH in Visual Studio Code? aupres 5 4,132 Aug-15-2023, 03:51 PM
Last Post: snippsat
  how do I open two instances of visual studio code with the same folder? SuchUmami 3 881 Jun-26-2023, 09:40 AM
Last Post: snippsat
  Visual Studio Code NewPi 3 1,043 May-16-2023, 11:13 PM
Last Post: snippsat
  Visual Studio Code venv ibm_db error mesi1000 7 2,786 Nov-13-2022, 12:36 AM
Last Post: snippsat
  debugging help on Visual Studio Code mg24 12 1,996 Oct-02-2022, 12:18 AM
Last Post: mg24
  Problem with importing Python file in Visual Studio Code DXav 7 5,072 Jun-15-2022, 12:54 PM
Last Post: snippsat
  Visual Studio Code Intellisense for Imported Modules Not Working hockinsk 1 2,711 Apr-23-2022, 04:41 PM
Last Post: deanhystad
Photo Visual studio code unable to color syntax on python interpreter tomtom 4 6,867 Mar-02-2022, 01:23 AM
Last Post: tomtom
  compile error Visual Studio Code jamie_01 2 1,692 Jan-25-2022, 09:36 AM
Last Post: Larz60+
  Calling python from c++ in visual studio pdk5 0 2,157 May-24-2021, 10:18 AM
Last Post: pdk5

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020