microsoft / vscode-js-debug

A DAP-compatible JavaScript debugger. Used in VS Code, VS, + more
MIT License
1.68k stars 284 forks source link

UNC path causes debugger to open file in new read only window #1148

Closed miquelfire closed 2 years ago

miquelfire commented 3 years ago

Describe the bug I recently started using VS Code on a recently reformatted machine at work, and noticed that when I set a break-point, it will open a new read-only window. The nature of the machine has the My Documents folder on a file share, so VS Code is displaying UNC paths (\\server\path to user\Documents\etc) instead of what is normally the standard C:\Users\username\Documents\etc

I'm going to assume the odd setup found an odd bug with path handling

Windows 10 20H2

To Reproduce Steps to reproduce the behavior:

  1. Open a project that is on a UNC path \\server\share\pathToProject Any project should do, but Step 2 below is for this repo only: https://github.com/miquelfire/aoc2021
  2. Look at index.js and see what parameter is passed to the run command. Set it to 0 and create a dummy 00.txt
  3. Set a break-point in index.js on the run command
  4. Run the debugger
  5. A new read-only window for index.js should appear

VS Code Version: 1.62.3

connor4312 commented 3 years ago

I don't have ready access to a system with UNC paths, could you collect a trace log using the instructions in the issue template? Thanks 🙂

aeschli commented 2 years ago

Verified with JavaScript Debugger (Nightly) v2022.10.1817