0

I'm trying to trace the code for DeepSpeech to learn about its inner working and it's using Tensorflow. And for that I'm using Pycharm.

After some hassle, I managed to setup the environment so now I can run its ./bin/run-ldc93s1.sh script successfully. Then I configured the Pycharm to do the same as the mentioned script. At this point, I can run that configuration (within Pycharm) and it will run exactly just like the script. I can see the logs in the console window and it finishes all just fine. But when I execute the same configuration in debug mode, it pauses at the first epoch:

...
I STARTING Optimization
I Training epoch 0...

And to be clear, the process does not exit. It just stays there without any progress as if the execution is waiting on a break point while there's no break point. Eventually, I have to stop it forcefully.

My question is, what could be a reason for some project to be able to run but not debugged? And to be even more clear, I know that TF creates a graph which is not that easy to debug. That's not my question. I just want to know why the same code that can be run, cannot be debugged?

Mehran
  • 15,593
  • 27
  • 122
  • 221
  • Just a very wild guess here but the core of tensorflow is written in C++, not Python(https://stackoverflow.com/questions/35677724/tensorflow-why-was-python-the-chosen-language). I wonder if the debugger doesn't know what to do with the call to that non-Python code. – Ben Jun 08 '20 at 02:52
  • If that was the case, shouldn't the debug execution proceeds just as if it was simply running the code (ignoring the breakpoints and everything)? Personally, I don't understand why it hangs in there! – Mehran Jun 08 '20 at 03:01

0 Answers0