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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add automatic launch configurations for detected project/launch types (Flutter, Dart CLI, Test, Dart web) #2216

Closed
isidorn opened this issue Jan 13, 2020 · 4 comments
Labels
in debugger Relates to the debug adapter or process of launching a debug session is enhancement
Milestone

Comments

@isidorn
Copy link

isidorn commented Jan 13, 2020

Hi VS Code dev here 馃憢

Last milestone we have introduced a Start View for debugging. More about this can be found here microsoft/vscode#84677
So when the user has no launch.json file this view should help him start debugging.

This view is currently language agnostic and not very cluttered thus we are slowly looking in opening it up to extensions. We have two options:

  1. Allow extensions to contribute commands / text to the current view. Those commands would be rendered as additional blue buttons or as some menu
  2. Allow extensions to contribute a whole view which would be below the start view. The Dart extension could choose what to render in that view and it would give a bit more control to the extension. Using context keys this view would only be visible in the "start" experience

What I would be interested in is what Dart would like to contribute to improve the start experience. If it is only commands, than I think it makes sense to show those commands in the start view (for example with additional blue buttons). If it is much more then it makes more sense that Dart contributes the whole view.
What are the biggest pain points that Dart users hit when setting up debugging?

Related python discussion: microsoft/vscode-python-debugger#164

Let me know what you think and how you envision the Dart debug start experience.
Thanks!

Current look of debug start view
fyi @DanTup

Screenshot 2020-01-13 at 11 27 54

@DanTup DanTup added this to the v3.9.0 milestone Jan 13, 2020
@DanTup
Copy link
Member

DanTup commented Jan 13, 2020

@isidorn thanks for the issue! Do you have any suggestions/guidelines for the sort of things we should add here? Generally in Dart we try to make just pressing F5 do the best thing (we have some heuristics to decide between running the app as a Flutter app, running as a Dart CLI script, or running tests, based on project structure, active file, etc).

Since this only shows up when there is no launch.json it seems like we probably shouldn't do too much here (we don't want functionality that "disappears" when you create a launch.json). I scanned through some of the other issues, but couldn't see any concrete suggestions. It'd be good to have some guidelines (or examples, for ex. for JS/TS) to encourage consistency across languages.

Thanks!

@isidorn
Copy link
Author

isidorn commented Jan 13, 2020

@DanTup thanks for the response and makes sense. We definetely do not want this view cluttereted and we do want consistency. So I suggest that we wait and see what we do for other langugaes before we focus on dart (the out of the box experience might work just fine for you).
If you get some ideas in the meantime do let us know. Thanks

@DanTup DanTup modified the milestones: v3.9.0, v3.10.0 Mar 24, 2020
@DanTup DanTup modified the milestones: v3.10.0, v3.11.0 Apr 21, 2020
@DanTup DanTup modified the milestones: v3.11.0, On Deck May 18, 2020
@DanTup DanTup modified the milestones: On Deck, v3.13.0 Jul 2, 2020
@DanTup
Copy link
Member

DanTup commented Jul 28, 2020

I took a look at this, and the example at microsoft/vscode#91471 and it looks like there's probably not a lot useful for Dart/Flutter to add here. There's already a debug button and that tends to just do the right thing (it will detect the project type and guess the entry point based on open files or files that follow the pub/Flutter conventions).

There are some things I think could be useful to add there as buttons, for ex.

  • Run Flutter app
  • Debug Flutter app
  • Run all Tests
  • Debug all Tests

However, these would need to be dynamic and it doesn't seem like that's possible.

I did spot a "Show all automatic debug configurations" link though - so it seems we have something to implement there (which could include the options above), so I'll take a look at that (and reuse this issue for that). Thanks!

@DanTup
Copy link
Member

DanTup commented Jul 28, 2020

Actually, it looks like microsoft/vscode#95863 might be suggesting showing those from the "automatic" list directly in the view, so we might get the best of both of the above :-)

@DanTup DanTup changed the title Contribute to debug start experience Add automatic launch configurations for detected project/launch types (Flutter, Dart CLI, Test, Dart web) Jul 28, 2020
@DanTup DanTup added in debugger Relates to the debug adapter or process of launching a debug session is enhancement and removed is discussion / feedback labels Jul 28, 2020
DanTup added a commit that referenced this issue Jul 28, 2020
@DanTup DanTup closed this as completed in 67de37d Jul 28, 2020
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 is enhancement
Projects
None yet
Development

No branches or pull requests

2 participants