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

Escaping of runInTerminal with spaces and single quotes makes launch fail #125934

Closed
fabioz opened this issue Jun 10, 2021 · 1 comment
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues

Comments

@fabioz
Copy link
Contributor

fabioz commented Jun 10, 2021

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

  • VS Code Version: 1.56.2
  • OS Version: Linux (Ubuntu 18.02)
  • BASH_VERSION:4.4.20 (1)-release

Note: this was initially reported in the python debugger (microsoft/debugpy#641), but after investigating, it appears to be an issue in VSCode itself (it may be a duplicate of #84235, but I'm not exactly sure that this is the case as that report is on Windows and this is on Linux).

Note: steps below on how to reproduce with the Python extension:

  1. Create a directory test's test.
  2. Add a file hello.py with the line print('test') within that directory
  3. Try to debug hello.py with a launch configuration such as:
        {
            "name": "Python: Current File",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
        }

Note: putting the absolute path to the file instead of using ${file} also reproduces the issue.

Apparently the issue is that VSCode escapes ' to \' and then surrounds with " due to spaces in the path and that makes the launching fail as it'll try to search for a file in a test\'s test instead of test's test.

@roblourens
Copy link
Member

This should now be fixed in latest Insiders

@github-actions github-actions bot locked and limited conversation to collaborators Jun 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues
Projects
None yet
Development

No branches or pull requests

3 participants