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

Debug & variable inspector break if filename case in editor differs to project explorer #100924

Closed
piraxi opened this issue Jun 24, 2020 · 4 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues

Comments

@piraxi
Copy link

piraxi commented Jun 24, 2020

If the filename case differs in the code editor to that of the project explorer, the debug breakpoints & variable inspector do not work properly. When the debug breakpoint is reached code execution stops, but the line is not highlighted and the variable inspector does not appear when hovering the mouse over variables.

  • VSCode Version: 1.46.1
  • OS Version: Windows 10

Steps to Reproduce:

  1. Create a C# project (dotnet new webapi)
  2. Create a class called ElasticSearchHelper.cs
  3. Add a method and some code to the class
  4. Place a breakpoint over a variable and debug (the breakpoint line is highlighted, and variable can be inspected by mouse hover)
  5. Stop debugging
  6. Leave the code editor open (this is important)
  7. Rename the file to ElasticsearchHelper.cs (changing the case of 's' in Search from capital to lower case)
  8. Debug again - the code execution stops at the breakpoint, but the line is not highlighted
  9. Hover the mouse over variables - the variables value does not appear

Does this issue occur when all extensions are disabled?: Yes

@piraxi
Copy link
Author

piraxi commented Jun 24, 2020

I forgot to add, you can easily work around this by closing the editor window and re-opening, then it will use the renamed file. But it drove me mad figuring out what was happening and restarting VSCode doesn't fix the issue because the tab with the incorrect filename stays open.

@piraxi piraxi changed the title Debug & variable inspector break if case of filename in editor differs project explorer Debug & variable inspector break if filename case in editor differs to project explorer Jun 24, 2020
@weinand
Copy link
Contributor

weinand commented Jun 24, 2020

@isidorn it should now be possible to make this case work.

@weinand weinand added the debug Debug viewlet, configurations, breakpoints, adapter issues label Jun 24, 2020
@weinand weinand removed their assignment Jun 24, 2020
@ilovett
Copy link

ilovett commented Jun 25, 2020

Yea I ran into this issue for the first time yesterday, I renamed a file from thing.ts to Thing.ts. I was confused for a bit why my breakpoints were not mapping in that file only. Eventually I noticed that the tab said thing.ts and sidenav file said Thing.ts. I tried closing all tabs, clearing recently opened, search history, editor history, etc., then reopening. Cannot get the file to open in the tab as Thing.ts (new case filename) it always opens as thing.ts now. Even renaming to something else, derp.ts and back to Thing.ts would not fix the filename in the tab.

Finally, opening a new vscode window and starting a new project would "fix" it. However now original project always open the file as the original case sensitive thing.ts and I cannot reset or fix the tab to open as Thing.ts which is pretty annoying.

@weinand weinand self-assigned this Jun 26, 2020
@weinand weinand added this to the On Deck milestone Jun 26, 2020
@isidorn
Copy link
Contributor

isidorn commented Sep 24, 2020

This should be fixed now. Dup of #106382

@isidorn isidorn closed this as completed Sep 24, 2020
@isidorn isidorn modified the milestones: On Deck, September 2020 Sep 24, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Dec 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues
Projects
None yet
Development

No branches or pull requests

4 participants