dart_frog icon indicating copy to clipboard operation
dart_frog copied to clipboard

fix: VSCode failure to start a development server

Open ralfeus opened this issue 1 year ago • 1 comments

Description Once a while the button "Start server" disappears from the bottom bar. If I try to start dev server from command menu I get an error:

Failed to find a Dart Frog project within the current workspace.

At the same time running dart_frog dev works just fine

Steps To Reproduce

  1. Open command menu (Ctrl + Shift + P)
  2. Choose Dart Frog: Start and Debug Development Server
  3. See error

Expected Behavior

Dev server is started

Screenshots image

Additional Context

OS: MacOS on M1 Dart Frog project is one of 3 in the workspace

ralfeus avatar Apr 12 '24 06:04 ralfeus

Hi @ralfeus thanks for opening an issue! Sorry for not being able to catch-up sooner.

The extension does have some logic to figure out where the Dart Frog server is meant to be. When there are multiple ones, as in your case, you should be prompted to choose between them.

If you open VS Code with the directory that your dart_frog dev project is running as the root does it still show the warning?

I would like to reproduce this, can you share the directory structure of your project with the 3 dart frog projects?

alestiago avatar May 16 '24 15:05 alestiago

Hi Alejandro, I've realized that when I select any of the route files I can start/stop the server and debug it. My project folder structure is something like this: image

So when I select any file from routes folder I can start/stop the server

ralfeus avatar May 29 '24 18:05 ralfeus

Hi @ralfeus ! I'm glad you've figured it out.

I'm waiting for a reply on:

If you open VS Code with the directory that your dart_frog dev project is running as the root does it still show the warning?

Is there anything that you would like us to do regarding this issue?

alestiago avatar Jun 18 '24 10:06 alestiago

Hi @alestiago, no, if I open the VS Code with dart_frog project as only one there is no warning and "Start server" is visible no matter what file is selected and it works properly.

ralfeus avatar Jun 18 '24 11:06 ralfeus

Thanks @ralfeus, I am closing this for now then. If anything comes up, don't hesitate on telling.

alestiago avatar Jun 18 '24 13:06 alestiago