I followed the microsoft doc and tried the following SO post. Currently I'm debugging via Python: Current File, and my launch.json is as follow:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"args": ["saveData","-s","XYZ"]
}
]
}
and I'm experiencing the following error
File "/home/XD/miniconda3/envs/drl/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/home/XD/miniconda3/envs/drl/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
...
File "/mnt/c/Users/XD/Documents/folder.vscode/launch.json", line 2
// Use IntelliSense to learn about possible attributes.
^
SyntaxError: invalid syntax
My main script is as follows:
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Choose Task')
subparser = parser.add_subparsers(dest='subcommand',help='sub-command help')
parser_sd = subparser.add_parser("saveData")
parser_sd.add_argument('-s','--Symbol', type=str, required=True)
parser_sd.add_argument('-f','--fileDest',type=str,default=None)
What is wrong with it?
launch.json