Can parameters be passed to a module for debugging?


It seems debug parameters are passed to modules as if the module is a script.

Currently I'm pasting function calls at the end of modules to get the debugger to work on modules. Is there a better approach?
3 comments
Comment actions Permalink
Hi Gene! I'm not sure I've understood it properly. Could you, please, clarify what are you doing and what goal you are trying to achieve?
0
Comment actions Permalink
Hi,

I'm trying to debug functions in a module. I can do this if I past the function call with parameters at the end of the module and choose PyCharm>Run>Debug while the module is active in the editor. I tried Edit Configurations > Default > Python but it is asking for script info. I filled in the module name and parameters but the parameters seemed to be passed to the module as if the module is called at the linux prompt.
0
Comment actions Permalink
Yes, thats right. Python run configuration expects python script and command-line parameters like in the linux prompt. Approach where you place function calls in the module and choose Run>Debug is correct. It can be not that convenient if you are experimenting with different parameters and want to debug. For that task the best way could be ability to debug command from integrated console, but unfortunately it is not implemented yet - you can vote for that featuer in our issue tracker http://youtrack.jetbrains.com/issue/PY-3057
0

Please sign in to leave a comment.