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
Can't debug if project resides in folder whose name contains special characters #1288
Comments
Note that there is an error from Powershell first before debugger even gets a chance to run. This seems to indicate that Windows is not happy about this path in general. I wonder if the folder is lazily synced? That's the default behavior for OneDrive, if I remember correctly... perhaps the auto-sync logic simply doesn't kick in for this, and so the file isn't actually physically there? Another possibility that I can think of is that the terminal is not running in UTF-8 mode, and thus the character gets mapped lossily, breaking the path in the command line when it is submitted. However, this really shouldn't be affecting Powershell... |
Windows and PowerShell have no problems with this path, and the VScode terminal does happen to be configured for UTF-8: I'm routinely debugging PowerShell code in VScode off that very same folder. The PowerShell error is caused by the execution of the command line built by the Python extension, where the character is replaced by a space. |
@karthiknadig, is this an issue with debugger invocation in PVSC? |
The command that is sent to the terminal with the PVSC does not handle the |
@sba923 Could you share the logs from running with |
Does this help? |
Yes, thank you! @karthiknadig This appears to be a VSCode issue. What the adapter does:
So U+2013 is still there in "cwd" and "args" as it should be. What VSCode does:
This is harder to see because it's not escaped here, but the "–" before Projects is indeed U+2013. But, as seen on the screenshots, it gets stripped right after, when VSCode generates the command line in response to this request (or possibly when it gets "typed" into the terminal?). Our launcher conveniently logs its own
Could you transfer the bug accordingly? |
Just curious: how come this doesn't affect other extensions e.g., PowerShell? |
I would expect it to affect Node.js if using |
Due to some SharePoint configuration weirdness, my project resides on a OneDrive-for-Business sync'ed folder whose path is:
C:\Users\...\...\... – Projects - Documents\...\test\tools
where the character before
Projects
isU+2013
.When attempting to debug a Python script in this context, I get:
The text was updated successfully, but these errors were encountered: