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

"Open Folder" dialog is prefilled with non-existent "lib" folder #46174

Closed
DanTup opened this issue Mar 20, 2018 · 11 comments
Closed

"Open Folder" dialog is prefilled with non-existent "lib" folder #46174

DanTup opened this issue Mar 20, 2018 · 11 comments
Assignees
Labels
debt Code quality issues
Milestone

Comments

@DanTup
Copy link
Contributor

DanTup commented Mar 20, 2018

This has been bugging me for days and I can't figure out where it's coming from. I'm debugging my extension in the dev host and when I click "Open Folder" it defaults to the last folder I opened, but the box at the bottom is prefilled with lib (which doesn't exist). This means I can't just hit <enter> but have to clear the text first.

I tried clearing my recent list but it still persists.

lib

@vscodebot
Copy link

vscodebot bot commented Mar 20, 2018

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@bpasero
Copy link
Member

bpasero commented Mar 20, 2018

@DanTup I have no clue what could trigger this other than suspect a Windows issue.

@bpasero bpasero added upstream Issue identified as 'upstream' component related (exists outside of VS Code) windows VS Code on Windows issues info-needed Issue requires more information from poster and removed upstream Issue identified as 'upstream' component related (exists outside of VS Code) windows VS Code on Windows issues labels Mar 20, 2018
@bpasero
Copy link
Member

bpasero commented Mar 20, 2018

@DanTup actually we seem to prefill a default path, can you add a breakpoint here and see what the default path resolves to?

@DanTup
Copy link
Contributor Author

DanTup commented Mar 20, 2018

@bpasero What's the correct way to do that? I tried opening dev tools, finding it in the file and adding breakpoints (I added a bunch) but they don't seem to be hit.

bps

@bpasero
Copy link
Member

bpasero commented Mar 20, 2018

@DanTup that is weird, maybe a different action gets executed, we can start one level before here maybe: https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/files/electron-browser/views/emptyView.ts#L63

@DanTup
Copy link
Contributor Author

DanTup commented Mar 20, 2018

Not hitting that either :( I opened emptyView.ts using Ctrl+P and when I added a breakpoint there, it jumped me over the the JS (where I'd already placed a BP), so seems it's not hitting them set from JS or TS. Breakpoints are definitely active :/

I tried searching through Local Storage in the dev tools and found lots of paths around this folder, but none that have lib directly have flutter (with either slash, single or doubled). Do you know where it's intended to get it from?

@bpasero
Copy link
Member

bpasero commented Mar 20, 2018

@DanTup did you maybe disable sourcemaps in dev tools? For me the breakpoint gets hit once I click on the button:

image

@DanTup
Copy link
Contributor Author

DanTup commented Mar 20, 2018

Aha, I think prettifying the JS view was breaking it - opening the .ts file first worked.

Here's the path that's being passed - this path does not not exist anymore - I guess it's using the last part of it still!

lib path

And here's a search through local storage for hhhhhhhh.. This doesn't show on the File -> Open recent list though.

storage

I guess a fix could be to ensure paths exist before using them as default locations for the Open dialog?

@bpasero
Copy link
Member

bpasero commented Mar 20, 2018

@DanTup can you open a file and then run these steps again? I think we have some code that uses a path based on the last active file that was opened. That could be it.

@DanTup
Copy link
Contributor Author

DanTup commented Mar 20, 2018

Yeah, I opened another file then closed gracefully and it's stopped happening. I guess mostly the dev host just gets terminated by my hitting Restart/Stop in the main Code instance so it doesn't update.

@bpasero bpasero added this to the March 2018 milestone Mar 20, 2018
@bpasero bpasero added debt Code quality issues and removed info-needed Issue requires more information from poster labels Mar 20, 2018
@bpasero
Copy link
Member

bpasero commented Mar 20, 2018

I pushed a fix to check for existence of the dialog default path before showing the dialog and otherwise not setting the path at all.

@vscodebot vscodebot bot locked and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debt Code quality issues
Projects
None yet
Development

No branches or pull requests

3 participants
@bpasero @DanTup and others