leoafarias / sidekick

A simple app to make Flutter development more delightful
BSD 3-Clause "New" or "Revised" License
1.57k stars 101 forks source link

Open in VS code does not open a new VS code window #233

Closed tobiasht closed 2 years ago

tobiasht commented 2 years ago

When pressing Open in VS code i expect the program to open a new window of VS code with my project. Instead it "hijacks" one of my currently opened projects. This is really annoying when you for example work on multiple projects or are running the backend locally.

aguilaair commented 2 years ago

What OS is this? It opens new windows in Windows 11

https://user-images.githubusercontent.com/29983481/169992954-592e0457-7405-4b42-b6e9-ef19127f7ae8.mp4

tobiasht commented 2 years ago

What OS is this? It opens new windows in Windows 11

MacOS Monterey 12.3.1 (Latest)

aguilaair commented 2 years ago

Can you try the "Custom IDE" mode and selecting the file Applications/Visual Studio Code.app/Contents/Resources/app/bin/code?

tobiasht commented 2 years ago

In the Applications folder you can only select an application, not the underlaying file structure. So the only thing i can select is Applications/Visual Studio Code.app.

Still does not work though, it only open a finder window to the project directory.

aguilaair commented 2 years ago

Please see this video to see how to do it. The example uses Adnroid Studio, but the only difference is the file you need to select

https://github.com/fluttertools/sidekick/pull/176#issuecomment-1032695978

tobiasht commented 2 years ago

Still does not work. When testing in the terminal, you first have to cd into the directory and then run code .

aguilaair commented 2 years ago

The thing is, not everyone has VSCode set in path. So code . will not work in all cases, this is the method that is used in Windows and Linux. Maybe Sidekick can check for VSCode in path and use this method which is preferred

aguilaair commented 2 years ago

@tobiasht mind checking #243 to see if it resolves the issue?

tobiasht commented 2 years ago

I'm on holiday for a month, if you can verify it before that, great, otherwise i will check it out when i get back. Cheers

aguilaair commented 2 years ago

I don't have a Mac to test it unfortunately, @leoafarias?

aguilaair commented 2 years ago

Hey @tobiasht are you back yet? Leo seems to be a bit out of the loop rn

tobiasht commented 2 years ago

It works!

tobiasht commented 1 year ago

This seem to not be working anymore unfortunately. On macOS it takes over an opened VS code project, instead of opening a new window. The best workaround for now is to open a new VS code instance before pressing the button.

aguilaair commented 1 year ago

What opening method are you using? This behavior is controlled by VSCode when using the URL launch method.

aguilaair commented 1 year ago

Please confirm VSCode is in your path. Also, what changed? Did you update to a new version of macOS?