我在visual studio代码中遇到此错误:
每当我因为这个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: Attach using Process Id", "type": "python", "request": "attach", "processId": "${command:pickProcess}", "justMyCode": true, "preLaunchTask": "kill_process" }, { "name": "Python: Current File", "type": "python", "request": "launch", "program": "${file}", "console": "integratedTerminal", "justMyCode": true, "preLaunchTask": "kill_process" } ] }
这是kill_process.bat文件的内容:
npx kill-port 8000
然而,当我从powershell运行脚本时,它会毫无问题地执行,这就是证据:
也许有人知道我如何在visual studio代码中运行kill_process.bat文件而没有任何错误吗?