Skip to content

Ensure debugger directory exists#906

Merged
philliphoff merged 3 commits intomasterfrom
philliphoff-debugger-folder
Apr 23, 2019
Merged

Ensure debugger directory exists#906
philliphoff merged 3 commits intomasterfrom
philliphoff-debugger-folder

Conversation

@philliphoff
Copy link
Member

Ensure the debugger directory exists prior to starting the container (or, rather, before any possible use of the directory), to prevent it potentially being created with permissions different than those used by VS Code (to actually acquire the debugger).

This resolves #897.

@philliphoff philliphoff requested a review from a team as a code owner April 22, 2019 18:42
@PrashanthCorp
Copy link
Contributor

I have larger questions about the use of a fileSystemHandler - all the functionality I could see in the codebase could be done with fs-extra's functionality. I don't think that should block this PR, but I'd like some context on that soon.

@philliphoff
Copy link
Member Author

@PrashanthCorp

I have larger questions about the use of a fileSystemHandler - all the functionality I could see in the codebase could be done with fs-extra's functionality. I don't think that should block this PR, but I'd like some context on that soon.

The FileSystemProvider serves several purposes, as a shield from the external library actually used (i.e. fs-extra) which allows it to be easily swapped with another if needed in the future, as an adaptor for when that library doesn't exactly provide the desired API (e.g. separate file/dir exist functions), as a convenient unit of dependency injection, and as a point for mocking in unit tests.

Could fs-extra have been used directly, yes. But consider the (currently) pending PR (#903) to replace opn, where a number of places in the code had to be touched due to the change. Had the openExternal() function existed as an abstraction layer for opn in the beginning, the change likely would have been much smaller.

@philliphoff philliphoff merged commit 7287cd4 into master Apr 23, 2019
@philliphoff philliphoff deleted the philliphoff-debugger-folder branch April 23, 2019 20:49
@microsoft microsoft locked and limited conversation to collaborators Oct 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'/home/$USER/.vsdbg/getvsdbg.sh' is missing after fresh install

2 participants