I'm complete beginner with linux (Ubuntu) but I have to use it and I'd like to automate some tasks that I do very often.
What I do:
Open VScode and open a project folder
Open new VScode window and open another project folder
Execute redis-server command in console
In second VScode window go to Debug and launch first configuration
and then second configuration (defined in launch.json file in
VSCode)
Open a chromium browser and a specific url
What could be the easiest way to achieve it? Are all the steps executable directly from console? Should I use any 3rd-party programs?
Related
WebStorm 2021.1
For an unknown reason, WebStorm started picking the wrong file when debugging React TypeScript => JavaScript app. I see the compiled JavaScript file instead of the ts file. What's strange is that the path and the line number are right, but WebStorm opens the wrong (JavaScript) file.
I think that started since I updated to the latest version.
IntelliJ IDEA have a nice workaround around this bug, Show alternative source switcher button. I'm looking for an equivalent in WebStorm. Does WebStorm has such option?
Details:
WebStorm ok
WebStorm stops right on file inside the project.
WebStorm not ok
WebStorm stops on right line and states the right path but opens the wrong file (js file instead ts file)
Line 7 is ok but supposed to be here:
VSCode always ok
The exact same run will work perfectly fine on VSCode:
gitpod
gitpod: https://gitpod.io/#https://github.com/Eliav2/react-use-call-onnext-render/tree/webstorm-test
to clone locally run: git clone --branch webstorm-test https://github.com/Eliav2/react-use-call-onnext-render.git and after that execute the commands in the .gitpod.yml file in the root folder.
To reproduce:
Open example\src\exampleFiles\ClickMeForBreakPoint.jsx and set the break point at line 9. This is file from the test project.
Open src\index.ts and set the break point at line 7. This is file from the linked package.
Start a debugging session. Open port 3000 and once the page is loaded click on the 'ClickMeForBreakPoint' button.
At will stop on first break point. great.
At VSCode at will stop on the right second break point. In WebStorm at will open the wrong file.
Debug the linked package and it will open the right file in VSCode. Clone and debug with WebStorm and it wont open the right file (at least on my local WebStorm).
I want to open a project folder using terminal.
when type the command .code in terminal it open up vscode but the folder is empty and there is no file.
obviously I can open it with right-clicking and open with code but is there a way i could open it through terminal?
I'm running Ubuntu as my operating system.
You have to use cd to enter in the folder that you want to open in vs code.
After that you just need to use code . and it will open the current folder in vs code.
Have installed angular CLI via node js command prompt. However, when I launch terminal in VS code, it doesn't allow to type only. PFA screenshot
PFB terminal setting screenshot
Able to run ng commands from node js command prompt outside vs code.
If your problem is not related to default shell in your terminal. Then you check windows settings. Follow the steps -
Open VSCode file location
Go to Compatibility tab in VSCode properties window
Unchecked Run this program in compatibility mode for: option
see the attached files. Try with this solution, it might help you.
This worked for me:
Remove settings file.
Click on view/terminal.
Select default shell.
I have a windows subsystem for Linux Installed on my computer and am using it as the integrated terminal on Visual Studio Code. Every time I open a terminal however, it opens in the root directory rather than the current project directory like other terminals do.
Does anyone know of a fix for this?
I have tried messing with the Cwd of the integrated terminal settings but haven't had any luck.
Try using wsl.exe as the command for shell.
"terminal.integrated.shell.windows": "wsl.exe"
I know that is very late for this answer, but for me it just worked.
I put exactly as above and it launched in my home directory (that is /mnt/d/Users/Adrian).
I have the user setup of VSC, 1.30.1 and launch it from the Desktop shortcut.
After I configured terminal as wsl I go as below:
If I open a cmd windows I can launch it with code . it will launch in Windows home directory.
If move to some other folder (e.g Documents) and launch it with code . the bash will launch to that folder.
Otherwise I can launch it with code D:\Users\Adrian\Documents\VSC and the bash terminal will launch in \mnt\D\Users\Adrian\Documents\VSC
Tested the change both via menu File->Preferences->Settings and with Ctrl+Shift+P (Command Pallete), Terminal: Default Shell.
Tried with bash and wsl.
Maybe you have some other bash installed in the path? (e.g. git bash or MinGW bash?)
If I've created a new meteor project (through adding packages) in terminal, how do I then actually SEE that project in my editor, Webstorm?
Thank you in advance!
To create a new Webstorm project from existing files:
Open Webstorm
Click FILE
Click OPEN with the folder icon next to it
Find and click the directory that contains your Meteor app and packages
You can obviously open your meteor project in web storm. If you mean how do you open a package to read the code they are stored as sym links by webstorm and you can open them from .meteorite in your home directory, or where ever you have installed it of you want to dig into the meteorite package code