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

resolveDebugConfiguration is not passed the correct (closest) workspace folder when they are nested #45580

Closed
DanTup opened this issue Mar 12, 2018 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Milestone

Comments

@DanTup
Copy link
Contributor

DanTup commented Mar 12, 2018

If you have a WorkspaceFolder inside a WorkspaceFolder, I'm told that getWorkspaceFolder(Uri) will always return the closest one.

As such, it seems reasonable to assume other APIs behave the same. However, if I hit F5 with a file open that exists in multiple workspace roots, the debug configuration provider gets called with the top-level folder and not the closest one.

Eg.:

my_projects                   // WorkspaceFolder
  |- my_flutter_project       // WorkspaceFolder
    |- my_flutter_script.dart
  |- my_dart_project          // WorkspaceFolder
    |- my_dart_script.dart

When I press F5 with my_flutter_script.dart open, I get given the my_projects WorkspaceFolder which means I don't detect that the project is a Flutter project.

@DanTup DanTup changed the title resolveDebugConfiguration is not passed the correct workspace folder when they are nested getWorkspaceFolder() does not return the closest path Mar 12, 2018
@DanTup DanTup changed the title getWorkspaceFolder() does not return the closest path resolveDebugConfiguration is not passed the correct workspace folder when they are nested Mar 12, 2018
@DanTup DanTup changed the title resolveDebugConfiguration is not passed the correct workspace folder when they are nested resolveDebugConfiguration is not passed the correct (closest) workspace folder when they are nested Mar 12, 2018
@jrieken jrieken assigned weinand and unassigned jrieken Mar 12, 2018
@weinand weinand assigned isidorn and unassigned weinand Mar 12, 2018
@weinand weinand added debug Debug viewlet, configurations, breakpoints, adapter issues bug Issue identified by VS Code Team member as probable bug labels Mar 12, 2018
@weinand weinand added this to the March 2018 milestone Mar 12, 2018
@DanTup
Copy link
Contributor Author

DanTup commented Mar 14, 2018

Fix looks good in Insiders to me! Is it too late/insignificant for the Feb recovery release? Solves a big issue for my users with debugging projects in sub folders; would be awesome if I could include the fix (which relies on this) in the next release.

@isidorn
Copy link
Contributor

isidorn commented Mar 14, 2018

It will be included in the march release, not for frebruary recovery since it is too risky.
Thanks for verifying

@isidorn isidorn added the verified Verification succeeded label Mar 14, 2018
@DanTup
Copy link
Contributor Author

DanTup commented Mar 14, 2018

Understood; thanks for the quick response!

DanTup added a commit to Dart-Code/Dart-Code that referenced this issue Mar 14, 2018
DanTup added a commit to Dart-Code/Dart-Code that referenced this issue Mar 16, 2018
DanTup added a commit to Dart-Code/Dart-Code that referenced this issue Mar 19, 2018
DanTup added a commit to Dart-Code/Dart-Code that referenced this issue Mar 19, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants