Skip to content

Missing documentation for running/debugging Dart webapp #3824

Closed

Description

@maks

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 🙂

Activity

  1. added
    in docs / websiteRelates to documentation, including the Dart Code website
    and removed on May 30, 2022
  2. added this to the v3.42.0 milestone on May 30, 2022
  3. DanTup commented on May 30, 2022

    @DanTup
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    in docs / websiteRelates to documentation, including the Dart Code website

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions