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

flutter "toggle debug paint" command #372

Closed
shamrin opened this issue Jul 20, 2017 · 5 comments
Closed

flutter "toggle debug paint" command #372

shamrin opened this issue Jul 20, 2017 · 5 comments
Labels
in debugger Relates to the debug adapter or process of launching a debug session in flutter Relates to running Flutter apps is enhancement
Milestone

Comments

@shamrin
Copy link

shamrin commented Jul 20, 2017

Default flutter app template has the following comment:

// Invoke "debug paint" (press "p" in the console where you
// ran "flutter run", or select "Toggle Debug Paint" from the
// Flutter tool window in IntelliJ) to see the wireframe for
// each widget.

It would be nice if Dart-Code would support "debug paint" as well. There are more commands that flutter run supports, but this was the most helpful in my opinion. And "full restart": #368.

@DanTup
Copy link
Member

DanTup commented Jul 20, 2017

@devoncarew @eseidelGoogle Is this command available via flutter run --machine? I can't see it listed on the daemon page though there is talk of calling service extensions - is it one of them? If so, where can I find the info? (I had a quick search through atom-flutter source but can't see anything that looks like this).

@DanTup DanTup added in flutter Relates to running Flutter apps is enhancement labels Jul 20, 2017
@devoncarew
Copy link
Contributor

@DanTup, the atom-flutter sources have not been maintained - I would not look to them for examples. The IntelliJ sources (Flutter related) are here: https://github.com/flutter/flutter-intellij.

For this, we're calling a service extension - contributed by the flutter runtime - called ext.flutter.debugPaint (https://github.com/flutter/flutter-intellij/blob/210cec052c4ed3a5f4fb77e2d58a62bfdc0d800f/src/io/flutter/view/FlutterView.java#L167).

And specifically, we're using the daemon API to proxy the service extension call (app.callServiceExtension, https://github.com/flutter/flutter-intellij/blob/master/src/io/flutter/run/daemon/DaemonApi.java#L84).

Hope that helps -

@DanTup
Copy link
Member

DanTup commented Jul 21, 2017

@devoncarew Perfect, thanks! Are there any docs on these service extensions, or is the IntelliJ source the best place to see everything available?

@DanTup DanTup added this to the v2.3 milestone Jul 21, 2017
@DanTup DanTup added the in debugger Relates to the debug adapter or process of launching a debug session label Jul 21, 2017
DanTup added a commit that referenced this issue Jul 21, 2017
@DanTup DanTup closed this as completed in 2f70e6c Jul 21, 2017
@DanTup
Copy link
Member

DanTup commented Jul 21, 2017

I've added all of the commands I could find in the intelliJ file, will be included in v2.3 (with the exception of opening Observatory timeline, that may or may not be included in 2.3).

@devoncarew
Copy link
Contributor

No docs as such; the IntelliJ sources will be the best system of record for a bit. You can also skim the flutter repo code, and you should be able to get a list of service protocol extensions from the protocol.

I've added all of the commands I could find in the intelliJ file

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in debugger Relates to the debug adapter or process of launching a debug session in flutter Relates to running Flutter apps is enhancement
Projects
None yet
Development

No branches or pull requests

3 participants