Non-English file names cause the debugger to choke
See original GitHub issueDescribe the bug
If I create a TypeScript file will non-English characters in the filename, the debugger gets confused. As does Intellisense.
I’m pretty sure this is a new problem. I’ve been using some of these file names for a while.
To Reproduce
debugger
- Create a file with a name like
¡Feliz cumpleaños!.tsor⛔message-from-server.ts. - Try to set a breakpoint in this file.
- Initially (before you try to run) the breakpoint will appear as it should.
- Run the program.
- The breakpoint will disappear.
- Try to set the breakpoint again, now that the program is running.
- It will disappear immediately
- Set a breakpoint somewhere else, and step through your file.
- When you get to this file, the debugger will show you the compiled version of the code, e.g. without the TypeScript annotations or the comments.
- You can set a breakpoint in the compiled file and that will work.
- As soon as you stop running the compiled file will disappear, so you can’t easily access it again.
intellisense
- Create a file with a name like
¡Feliz cumpleaños!.tsor⛔message-from-server.ts. - In a different file, reference an item that is exported from the file with the non-English characters in the name.
- Intellisense will suggest adding an import. Accept its suggestion.
- The line it creates will quote all of the non-English characters like this:
import { celebrate1 } from "./%C2%A1Feliz%20cumplea%C3%B1os!.ts"; - You can keep that ugly file name with the URL-style quotes or you can change it to the easy to read format. It doesn’t make a difference.
- Either way the program will run fine.
- Either way the debugger will act up like described above.
Expected behavior
VS Code should allow you to use most characters in file names. (Like the TypeScript compiler and the JavaScript runtime.)
The debugger should work like normal. I should be able to set breakpoints in any file. I should be able to see my comments and my TypeScript annotations while I’m stepping though my code.
The suggested line should not try to quote the file name. It’s already in double quotes, so you don’t need the URL quoting on top of that.
Note that the file export it adds includes the .ts file extension. So I know the Deno extension is involved. Without the Deno extension VS code would remove the file extension before trying to add the import.
Screenshots
Create a file with non-English characters in the file name:

Reference this file from another file. Notice the intellisense recommendation:

Try to set a breakpoint on line 4 of the file:

When you step through the code you’ll see the the compiled version of the code. Notice that line 4 of the compiled file has a breakpoint, but it does not correspond to line 4 of the source file:

Versions
vscode: 1.60.0 deno: xxx extension: v3.8.1
Version: 1.60.0 (user setup) Commit: e7d7e9a9348e6a8cc8c03f877d39cb72e5dfb1ff Date: 2021-09-01T10:41:52.311Z Electron: 13.1.8 Chrome: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Windows_NT x64 10.0.19042
I noticed this shortly after VS Code updated itself. I know VS Code did an update because of an unrelated bug. The Deno extension updates itself automatically, so I don’t know if that’s new or not.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)

Top Related StackOverflow Question
The intellisense/suggestions/hover/code actions are a seperate issue than the debugging problems, and I have opened denoland/deno#12065 to address that.
Thank you. It is a bug, I don’t think we anticipated it. There are two underlying issues, the debugger and the code actions (the import suggestion). Like there are other issues. We need to deal with some URLs that contain URL encoded characters.