Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing documentation for running/debugging Dart webapp #3824

Closed
maks opened this issue Feb 8, 2022 · 1 comment
Closed

Missing documentation for running/debugging Dart webapp #3824

maks opened this issue Feb 8, 2022 · 1 comment
Labels
in docs / website Relates to documentation, including the Dart Code website
Milestone

Comments

@maks
Copy link

maks commented Feb 8, 2022

https://dartcode.org/docs/launch-configuration/ says:

However there are some things you can’t do without a launch configuration, such as:
...
Run Dart (non-Flutter) web apps

But I couldn't see an example of how to do it for a Dart (not flutter) webapp project.

I did get it working by following instructions from this comment to have a launch config like this:

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "webmidi_bug_demo",
      "request": "launch",
      "type": "dart",
      "program": "web/index.html",
    }
  ]
}

That then when I did "F5" launched the app and launched Chrome just as it does when I run webdev serve --debug manually.

So it seems the trick is to know to set program to set your html file entry point (instead of the dart file as you would for say cli apps). It might be good to update the docs page on dartcode.org about this to help future dart webapp devs use this nice quality of life feature in Dartcode 🙂

@maks maks added the is bug label Feb 8, 2022
@DanTup DanTup added in docs / website Relates to documentation, including the Dart Code website and removed is bug labels May 30, 2022
@DanTup DanTup added this to the v3.42.0 milestone May 30, 2022
@DanTup
Copy link
Member

DanTup commented May 30, 2022

But I couldn't see an example of how to do it for a Dart (not flutter) webapp project.

It was mentioned in a comment on that page, but it wasn't very obvious:

		// The entry script to execute when running the app.
		// Set to a "web" in a Dart web app to run in web move.
		// Set to "test" in an app with tests to run all tests.
		"program": "bin/main.dart",

I've linked the text "Run Dart (non-Flutter) web apps" to a new page that is specifically about this. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in docs / website Relates to documentation, including the Dart Code website
Projects
None yet
Development

No branches or pull requests

2 participants