How to make the beginning of directory on the new line from the end of terminal in VS Code - visual-studio-code

In the first screenshot is VS Code on my PC and the second one is from my laptop.
As you can see, I'm using the same code in both screenshots, but in img1, the terminal output ("3") is on the different line with the file directory unlike the second one which stick right into it.
I don't know how to fix this problem, if anyone know how to change this please give me an instruction
first screenshot
second screenshot

Related

Configure VS Code output window for python to jump to last line of output window?

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.

Flutter - Is there a way to see which line of the code throws an error?

I am new to Flutter. So sorry if my question is silly...
In Flutter is there a way to see which line throws an error?
E.g. I have this in console.
And this in the stimulator.
Can I understand from it which line throws it?
You can see the line of code that has error in your screenshot bro, all you need to do is read it and we can see that the error is in #1.
it says that you story.dart has error on line 200
Using the console
See all the files in blue on the console? They represent all files (yours and those from the Flutter SDK and libraries) connected to the error message.
There is a high chance that the line that throws an/the error is not from the libraries but from your own code. So, what do you have to do?
Scan all files in blue that are from your own code and look for the one that has the strongest relationship with the error message.
For example, in your case, story.dart is your own code. Ctrl + click on story.dart files in blue to see the line that may have caused the error/exception. In your case, there is a high chance that you are trying to read or delete an element from an empty list.
You can also use the VSCode debugger to do this
I have had the same problem: VSCode opening flutter source files and pointing to an exception in them, instead of in mi code. After reading #user2740650 comment, a looked carefully to the bottom bar, and discovered the Debug my code + packages + SDK text in it.
Screen capture of bottom bar in VSCode
I clicked on it and switched to Debug my code, and my problem was solved!

How to see the "hints" or "prompt message" in the visual studio code for matlab (.m) file?

I am trying to use Visual studio code to edit my Matlab .m file. After installation and setting of Matlab extension, I can write my m file now. The variables color markers are correct. But I found a problem about the "hints" or "prompts" of my code. I don't know the exact term of it. I just describe it in an example.
When I write some problematic code in Matlab editor, there would be a wavy red line under there. When my mouse cursor stay there, a message pops up, like invalid syntax at the end of the line. In the Vscode editor, there is wavy line, too. But it can't show the content of the prompts but only some rhombus symbols. There is a button Peek Problem under it. Sorry for lacking pictures here. I am trying to describe the problem in details.
I may need to change the settings but don't know how. Do I need more extensions? Any suggestions would be appreciate.
Following prompt of #nekomatic,
add "matlab.linterEncoding" : "gb2312" to the setting.json.

Flutter_Console every command just freezes and does not return anything

I have tried Flutter Doctor, creating an app, checking what channel I am on, even switching channels.The only thing that happens is what is in the screenshot below. I see the command and get no response on the next line and instead only a blinking cursor.
The problem was I just copied the files from inside of the zip and didn't extract them first, after extracting them it is now working.

Why does file have to be saved prior to running?

In MATLAB, why does the file have to be saved prior to running ?
I often try quick snippets of code, which I could also easily run also on the Command Window line by line. So, why when I run them through the editor, I have to save them first ?
Can this behaviour be changed, maybe ?
You can use cell mode in the editor placing %% before your code. See also Cell menu in the editor. Once you create cells, you can run them one by one pressing Ctrl-Enter. You don't need to save the file. However you cannot use editor's debugging features (breakpoints, etc).
Video tutorial
my guess would be that when you run your program, the matlab interpreter run it from the disk and not from the IDE buffer. so if you don't save the file it wouldn't run the correct code.