I am writing my first library in Python, When developing I want my run code button in VS Code to always start running the code from the main.py file in the root directory. I have added a new configuration to launch.json however I seem to be unable to use this configuration as default. How can I do this/
You need to put the 'launch.json
' under the '.vscode
' folder inside your workspace. Then Run
> Run Without Debugging
(shortcut on windows CTRL+F5
)
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": "${workspaceFolder}/main.py","console": "integratedTerminal"}]
}