A question from a newbie here: when I run some python code in VSCode, there is always a display of source code in the interactive window. Thus I have to scroll all the way down before I can see the output. That makes the debug quite troublesome.
Please see the screenshot above. The code was displayed in the interactive window despite the editor just at left side over there. Any way to have VSCode, or maybe Jupyter extension, go directly to the output? (in my case starting from the 'Training Dataset shape......')
Related
My terminal in VS Code has since the previous update shown the word ERROR on every single line. I have installed oh-my-posh a little while back to make the terminal more pleasant to look at and give me some basic information.
Does anyone know where to look, to find the source of the error message? Tyvm :)
Update
Noticed something different when running echo $ as suggested by #kamen-minkov
When I booted Ubuntu up again and my VS Code opened from the previous state it was in the ERROR label was gone:
However. When I opened up a new tab it returned:
The only difference I can notice between the two is that there is a little, unfilled, circle/dot on the left side of the newly opened tab and not the one that opened up with VS Code. Is it some sort of debugger marking or something else? Could it be the source of the problem?
Apparently it's the Shell Integration decorations that's causing the hazards..
// settings.json
"terminal.integrated.shellIntegration.enabled": false,
"terminal.integrated.shellIntegration.decorationsEnabled": "never",
disable these settings and oh-my-posh error label will be gone :)
I'm using Julia on Visual Studio Code. I just found that the error trace is missing if I toggle bash up and down. If no toggle action is done, nothing went wrong, which is not possible for me.
Did anybody ever encounter this before? I'm sure it's a problem with Visual Studio Code because I tried toggle in another bash and the output is trimmed.
Taking this shell as example, a full output is what I need, but when I click 'toggle the panel' (marked red) to editor window and then return to shell, the full output is trimmed, like this. Most part will be lost, sometimes in the middle, sometimes at the beginning.
So I prefer VScode due to the added features and speed,but I have one problem.I prefer my output in a separate terminal like cmd.In atom the gpp compiler package does that for me.But in VScode,output is displayed in a in-built terminal below your code.I usually dont prefer that as it becomes difficult for me to see the output properly since I have a small screen.
So how can I do that in VSCode?
I am sorry if the question doesn't make sense, I didn't really know how to phrase it properly.
What I am trying to achieve is similar to how it works in the command prompt when running a python file. When I run a python file from the command prompt, the command prompt window will jump to the last outputted line during the running of the program, so what is currently being outputted is always visible. However in my current VS Code set up, the output window will not jump to the last line as it is printed, and I have to scroll through the output window to see what is happening with the program.
I am currently using the latest version of VS Code and using the code-runner extension as well. Please let me know if what I am asking does not really make sense.
Thanks
As far as I understand your question, I would like to answer it.
To Auto-Scroll to the last output, you can just click on the Lock Icon near the Clear Console icon.
My R Interactive Terminal in Visual Studio Code is too short, cutting-off or wrapping the returned values too early, leading to confusion during data analysis or feature engineering. Is there any way for me to increase the width of the R Interactive Terminal?
Specifically, I am referring to the Terminal Window that is used to display processed code results from R, Python or any other interpreter:
https://webzest.com/vsc_terminal.png
you can collapse the sidebar to gain some more space. the toggle sidebar command is under View/Appearance/Show Side Bar and the keyboard shortcut is ⌘+B on macos or ⌃+B on windows. see attached screen image.
edit: thanks for sharing a screen-print, that helps to explain what you are seeing. sorry i misunderstood... i am wondering if the issue is related to the R shell you are running.
you can see in the attached screen images that the zsh shell uses all of the space available to the terminal panel.
...also, this is on macos, i have not tried windows but that could be part of it.
can you try some other shells and see if they are affected in the same way?
You can use the new setting in v1.61:
workbench.action.terminal.sizeToContentWidth
to toggle wrapping the lines. Depending on your current terminal width you may or may not get a horizontal scrollbar when you do this but at least you won't get wrapping at some pre-determined too small width. This command is also available on the terminal tab context menu: Toggle Size to Content Width.
This question and answer should help
Basically setting options("width"=200) or any value that works for you