My setup.py has the following console_scripts as entry points:
entry_points={
'console_scripts': ['script=myapp.app:do_something',
'script2=myapp.app:do_something2'],
},
with the following structure
.
├── myapp
│ ├── __init__.py
│ ├── app.py
│ ├── mod.py
│ ├── mod2.py
│ └── submodules
│ ├── __init__.py
│ └── mod3.py
├── requirements.txt
└── setup.py
and app looking like
##my_app.app
def do_something():
#do stuff
def do_something2():
#do other stuff
How can I get VS code debug configuration to enter at these module attributes. I have this that can run the module if I use if __name__ == "__main__": do_something() but want seperate launch.json files depending on the console_scripts
##launch.json
{
"configurations": [
{
"name": "Python: Module",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}",
"module": "myapp.app",
"args": ["--hello world"]
}
]
}
Thought you might be able to do simlar with:
"module": "myapp.app:do_something",
but alas:
No module named myapp.app:do_something