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

Reduce reliance on variables passed to debug adapters #2783

Closed
DanTup opened this issue Sep 10, 2020 · 3 comments · Fixed by #2954
Closed

Reduce reliance on variables passed to debug adapters #2783

DanTup opened this issue Sep 10, 2020 · 3 comments · Fixed by #2954
Labels
in debugger Relates to the debug adapter or process of launching a debug session is enhancement
Milestone

Comments

@DanTup
Copy link
Member

DanTup commented Sep 10, 2020

There are many variables passed into the launchRequest like dartVersion and flutterVersion that are only supplied by VS Code. In order to make the Debug Adapter more reusable, these things should be computed inside the debug adapter. All variables should also have sensible defaults.

@DanTup DanTup added is enhancement in debugger Relates to the debug adapter or process of launching a debug session labels Sep 10, 2020
@DanTup DanTup added this to the On Deck milestone Sep 10, 2020
@DanTup DanTup modified the milestones: On Deck, v3.16.0 Oct 1, 2020
@DanTup DanTup modified the milestones: v3.16.0, v3.17.0 Oct 26, 2020
@DanTup
Copy link
Member Author

DanTup commented Nov 12, 2020

@ericdallo FYI - as part of this work, I'm removing dartPath, flutterPath, pubSnapshotPath, dartVersion, flutterVersion from the launch arguments for the debug adapter, and replacing them with just dartSdkPath and flutterSdkPath. You're currently setting some of these here.

When most of these were added, VS Code was the only consumer so it was convenient to just pass them in. However, it's made using the debug adapter more complicated when many of the values could be computed by the debug adapter. This should simplify things a little (I'm also reviewing the defaults and making sure most of the values are entirely optional).

(Note: Use of this debug adapter by non-VS Code clients isn't "officially" supported, though I would like to ensure it works and is not too burdensome! 🙂).

@ericdallo
Copy link

Thank you very much @DanTup, I totally agree!
I''ll update lsp-dart and remove the unnecessary variables :)

@ericdallo
Copy link

ericdallo commented Dec 6, 2020

Sorry for the delay @DanTup , I just bumped lsp-dart to use Dart-Code debugger extension 3.17.0 removing the unused variables replaced by dartSdkPath and flutterSdkPath, thank you!
emacs-lsp/lsp-dart@a2c3021

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

Successfully merging a pull request may close this issue.

2 participants