Skip to content

"\n" become "\\n" raise a parameters parsing error in mac os zsh commandline #13

Open
@Interesting6

Description

@Interesting6

🐛 Bug Report

when the input occupied more than one line, all input lines will transform into one line connected by "\n" as a sys.stdin. And then that converts to a shell command.
However, the \n in command turns out to be \\n in macOS zsh environment, which cause a Parameters parsing error.

当输入为多行时,输入会被转化为一行以"\n"连接的字符串,但在debug时,在macOS的zsh中,\n会被转化为\\n,导致了参数解析错误。

Expected behavior

Normal

Extension Output

cd /Users/treamy/Codes/Algorithms/LeetCode ; /usr/bin/env /usr/local/bin/python3 /Users/treamy/.vscode/extensions/ms-python.python-2021.2.582707922/pythonFiles/lib/python/debugpy/launcher 49611 -- "/Users/treamy/Library/Application Support/Code/User/globalStorage/wangtao0101.debug-leetcode/python3problem236.py" /Users/treamy/Codes/Algorithms/LeetCode/236. 二叉树的最近公共祖先.py [3,5,1,6,2,0,8,null,null,7,4]\\n5\\n1 lowestCommonAncestor TreeNode,TreeNode,TreeNode TreeNode 236 52013

Guidance: Press Ctrl+Shift+U, and toggle the channel to Debug LeetCode.

Your Environment

  • python 3.6.5
  • os: macOS
  • extension settings:
  • nodejs version:
  • vscode version: 1.52.1
  • extension version: 0.2.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions