How to use Pycharm debugging mode while using the Pycharm "Python Console" tab to call function?
Hey all,
I'm writing a website using Django and Pycharm. I like using Pycharms "Debug" mode but don't know how to use it if I don't have a front end to call the function.
I typically build a function and test it by calling the function in the Python Console tab of Pycharm. If there is an error that I can't solve through the error log I have to alter the index/landing page to call that function in while in Pycharms debug mode to use the debugging feature.
There must be a way to use the debug mode when a developer has not written a front-end access to call the function but I don't know how. Can anyone help me with this?
请先登录再写评论。
Hi,
Debugger is stopping at the breakpoint only when execution reaches the line with the breakpoint. So you have to call that function/method by any means to reach the breakpoint. This could be either invoking the code from the browser/frontend, or calling the necessary function/method from Python console.
Andrey Resler when I try and call the function while Pycharm is in debug mode I get the following "Pause the process to use command-line".
Is it possible to create a minimal project to demonstrate the issue and provide it along with the steps to reproduce? I will verify if it's a bug or will try to give you advice on how to better use the debugger in your case.