Python Forum
how do I open two instances of visual studio code with the same folder?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how do I open two instances of visual studio code with the same folder?
#1
I'd like to run two pieces of code simultaneously. I thought the easiest way to do that would be just to open two instances of studio code and run them both. However, when I try to open the folder on the second instance, it's just redirecting me back to the first instance.

Any suggestions welcome.
Reply
#2
Why not run one, or both, from a shell?
Reply
#3
That's a great idea. Thank you.
Reply
#4
To duplicate current folder when in VS Code File --> Duplicate Workspace

Open in current folder from shell,this is what i always use.
Then can use Duplicate Workspace,when open in VC Code.
C:\div_code
λ code .
To force a open a new window
C:\div_code
λ code -n

# Or just
C:\div_code
λ code
More.
# Open a folder with path given
C:\
λ code G:\div_code\foo

# Open parent folder,also this open C:\div_code
C:\div_code\answer
λ code ..

# <code> is cli tool so it dos has --help
C:\
λ code --help
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Compare folder A and subfolder B and display files that are in folder A but not in su Melcu54 3 566 Jan-05-2024, 05:16 PM
Last Post: Pedroski55
  My code works on Jupyter Lab/Notebook, but NOT on Visual Code Editor jst 4 1,052 Nov-15-2023, 06:56 PM
Last Post: jst
  How to set PYTHONPATH in Visual Studio Code? aupres 5 4,239 Aug-15-2023, 03:51 PM
Last Post: snippsat
  Visual Studio Code NewPi 3 1,062 May-16-2023, 11:13 PM
Last Post: snippsat
  Visual Studio Code venv ibm_db error mesi1000 7 2,833 Nov-13-2022, 12:36 AM
Last Post: snippsat
  debugging help on Visual Studio Code mg24 12 2,024 Oct-02-2022, 12:18 AM
Last Post: mg24
  Problem with importing Python file in Visual Studio Code DXav 7 5,121 Jun-15-2022, 12:54 PM
Last Post: snippsat
  Visual Studio Code Intellisense for Imported Modules Not Working hockinsk 1 2,732 Apr-23-2022, 04:41 PM
Last Post: deanhystad
Photo Visual studio code unable to color syntax on python interpreter tomtom 4 6,924 Mar-02-2022, 01:23 AM
Last Post: tomtom
  compile error Visual Studio Code jamie_01 2 1,698 Jan-25-2022, 09:36 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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