赞
踩
简单来说就是配置下launch.json:
python:
- #!/usr/bin/python3
-
- import argparse
-
- parser = argparse.ArgumentParser(description='Process some integers.')
- parser.add_argument('-u', '--user', dest='user', help='user, like 12.8')
- parser.add_argument('-v', '--version', dest='version', help='data version number', default='0')
-
- args = parser.parse_args()
- print(args.user)
- print(args.version)
launch.json:
- {
- // 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": "internalConsole",
- "args": ["--user", "abc", "--version", "xyz"]
- }
- ]
- }

到settings里搜索interpret,改变defaultInterpreterPath
搜索Keyboard Shortcuts,坑点在于Keyboard Shortcuts不在settings里,经常在code->Keyboard Shortcuts路径下
Shift+Command+P一起按住,点击下面的Launch TensorBoard
Shift+Command+P一起按住,输入reveal
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。