的右键菜单中选择“Debug As”——》“Debug Configurations...”,如下图: 填写启动类(启动类就是带有main方法那个类)和命令行参数,如下图: 直接运行Java程序的设置与这个类似,就是第一步改为选择“Run As”——》“R...
自定义命令行参数代码如下: def pytest_addoption(parser): parser.addoption("–cmdopt", action=“store”, help=“test case path”,default=’./data’) 直接在命令行执行命令 pytest --cmdopt=./data. 可运行成功 现想在运行的时候debug代码,在pycharm中增加如下配置 image1020×653 59.5 KB 报错信息...