简体   繁体   English

在VS Code上进行Python调试的SpecifyScriptArgs

[英]SpecifyScriptArgs on Python debug on VS Code

Is there a way to pass arguments on each python debug in VS Code? 有没有一种方法可以在VS Code中的每个python调试上传递参数?

Powershell plugin in VS code you can specify at the file launch.json : 您可以在文件launch.json指定VS代码中的Powershell插件:

"args": [ "${command:SpecifyScriptArgs}" ]

This opens a popup before the run so that the user can enter the args parameters for that run. 这将在运行之前打开一个弹出窗口,以便用户可以输入该运行的args参数。 I have tried this with python but it does not work. 我已经用python尝试过了,但是没有用。 Is there some way to pass new arguments on each debug? 有什么方法可以在每次调试时传递新的参数吗?

No there is not without editing some file before each launch. 没有,在每次启动之前都必须编辑一些文件。 If you would like such a feature then please request it at https://github.com/microsoft/vscode-python/issues . 如果您想要这样的功能,请访问https://github.com/microsoft/vscode-python/issues

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM