Run devcontainer from command line without the need of 'Reopen in Container' in vscode - command-line

I have a dotnet project running in a dev container. I would like to run this container via command line. Is there any way of doing this without having to click on the vscode popup (Reopen in Container).
Current approach:
code .
In vscode: Reopen in Container

Related

I have to "source ~/.zshrc" everytime I open a new terminal only in vscode

Currently have to manually write source ./zshrc to get my zsh plugins to work within the vscode terminal window, however I dont have this issue if I open a zsh shell outside of vscode. I am using Debian on wsl2.
In terminal I get proper syntax example (due to a plugin)
However in vscode I dont unless i run source ./zshrc
As seen here:

vscode settings.json - run background terminal application on startup

Is it possible to run a terminal application in the background when starting vscode?
I have a file synchroniser service I need to run alongside vscode in the same folder.
I am thinking some settings.json, but unable to finde anything.

How can I run an independent dart file in Visual Studio Code when my app is already running?

I have an already running Flutter project in Visual Studio Code,
but I want to run a separate Dart file in the same project without terminate my running project.
When i tried to run this file, the running project stops.
You can open your terminal and execute your dart file like
$ dart ./file.dart
To open the terminal, use any of this options:
Use the ⌃` keyboard shortcut with the backtick character.
Use the View > Terminal menu command.
From the Command Palette (⇧⌘P), use the View: Toggle Integrated Terminal command.
https://code.visualstudio.com/docs/editor/integrated-terminal

Is there a way to launch Visual Studio Code and force it to open in a Remote Container?

I regularly open Visual Studio Code via code . and then have to click the Re-open in Container button.
Am I missing any shortcut to force it to do this from the command line?
You can open devcontainer directly with devcontainer CLI.
Install devcontainer CLI by running
Remote-Containers: Install devcontainer CLI from VS Code. Then just run:
devcontainer open
in the same directory where you'd run code . and you will skip the Re-open step.
There is a way to do this GUIcally in Windows. I suspect this will also work for SSH / WSL workspaces.
Open your dev container in VSCode as usual.
Right-click on your VSCode taskbar icon; it should show you a jump list with MRU workspaces.
Look for that [Dev Container] list item (mine shows localhost:2375 because that's my docker host). You might like to pin it.
You can open directly into the dev container by clicking on that item.
I have done this with ApiLogicServer - you build the .devcontainer file, plus the Dockerfile

To build a script from Eclipse to run commands in cmd

I am using a set of commands to build my project in a expanded mode to deploy it in weblogic so each time i need to go to cmd and change directory to my project directory and run the command 'client dev fullexpanded' .
I want to make a script to run these commands which i running through cmd in my eclipse so each time i dont have to open cmd and write these commands
Add the script as an External Tool (Program type) and you'll be able to fire it off from the toolbar.