question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow running a Flutter app from a project subfolder

See original GitHub issue

For projects implementing Flutter widgets (or plugins) it is very common to have an example app in example/ folder. Like here:

https://github.com/pulyaevskiy/parallax-image

Currently it doesn’t seem possible to run such apps in vscode. I tried modifying launch.json to have "program": "example/lib/main.dart" but it still fails with following error:

Launching example/lib/main.dart on iPhone 7 Plus in debug mode...
No application found for TargetPlatform.ios.
Is your project missing an ios/Runner/Info.plist?
Consider running "flutter create ." to create one.
Exited (sigterm)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
junaid1460commented, Jul 26, 2021
  "cwd": "yourdirecory"

?

0reactions
DanTupcommented, Mar 3, 2018

By the way, I just tried to do this and added example subfolder as second root. It still failed to locate lib/main.dart when I hit F5

My first guess is that you already had a launch.json somewhere so the debug config was set to it. The launch.json-less launching only works when you have no selected debug configuration. For multiple projects you’ll likely need to have launch.jsons.

See my latest comment on the related case though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Flutter web app in a subfolder just returns to the root page
Now when you build a Flutter web app that isn't being served from the root, you need to change the base in the...
Read more >
Integrate a Flutter module into your Android project
This creates a some/path/my_flutter/ Flutter module project with some Dart code to get you started and an .android/ hidden subfolder. The .android folder ......
Read more >
All you need to know about the default Flutter project folders ...
A new Flutter project contains a lot of files and folders. In this article, we'll inspect them and reveal their purposes.
Read more >
Flutter Project Structure: Feature-first or Layer-first?
An overview of the feature-first and layer-first approaches when choosing a project structure for medium/large Flutter apps, along with ...
Read more >
Flutter Folder Organization | Engineering Education (EngEd ...
Android: The Android folder contains files and folders required for running the application on an Android operating system. These files and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found