Escape question mark in VSCode launch.json file argument

Viewed 18

I am trying to launch my program using VSCode launch.json; however it seems that passing special characters as argument in launch.json lead to json processing errors.

In my case:

"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "vmware.py", "args": ["--api-user=MyUser", "--api-pass=My(SpecialP?ss"],
"console": "integratedTerminal",
"justMyCode": false

Apparently, the problem is caused by the question mark which I have tried to escape it, but without success.

This gives me "Timed out waiting for launcher to connect":

"--api-pass='My(SpecialP?ss'"

This completely "hides" the question mark from the what is being sent to my script:

"--api-pass=My(SpecialP?ss"

How can be the question mark properly escaped?

0 Answers
Related