Debugging in Pycharm - Calling MySQL Stored Procedure in a loop hangs script
I have a Python Script which calls a MySQL Stored Procedure in a loop which repeats about 60 times ( 5 years and 12 months of Data). If I run the script normally there is no problem, but if I run it in 'Debug' it will hang when calling the Stored Procedure after about 20 iterations.
Any ideas why this should happen?
Please sign in to leave a comment.
Hi,
I couldn't find similar issues in our issue tracker so it may be related to another bug or it's a yet unknown one.
Is there any chance you could provide an example that reproduces the problem?
See if adding these environment variables to your run configuration (Run | Edit Configurations...) helps:
PYDEVD_USE_CYTHON=NO
PYDEVD_USE_FRAME_EVAL=NO
Sergey Karpov thanks for the quick response.
I have added the Environment Variables and ran it again in debug mode, but it failed at 2018-07 it is looping through the years then the months so starting at 2017-01 it has done 32 of the 60 before falling over. It definitely fails on the call to the Stored Procedure
Running in the IDE not in debug mode works fine.
Let's add one more env variable PYCHARM_DEBUG=True to see additional debug output.
Could you reproduce the issue and provide the whole console output?
OK, here is the output: It only managed 9 iterations this time.
Hmm, that's weird.
Could you upload your logs folder zipped from Help | Collect Logs and Diagnostic Data to our FTP server https://uploads.services.jetbrains.com/ and let me know the Upload ID?
OOps!,had to upload twice forgot to copy the ID first time. Second one is 2021_03_15_7NiMc9VRHE8MT5CC
I only left the data referring to the current program from the indexing-diagnostic folder
Cheers