pycharm debug is not working

hi intellij, I am facing an error during the debug, on that time I think the update problem,

but even i update the pycahrm i am facing an error0"pydev debugger: process 7244 is connecting".

i don't know how to fix it.

5 comments
Comment actions Permalink

Hi, more information is welcomed. How exactly do you reproduce the issue? Which code do you run (provide code snippet)?

0
Comment actions Permalink

Sorry for jumping on this thread, but I am also facing same issue while debugging:

Below is the stack trace I am getting:

<snip>

/Users/nitin_bodke/.virtualenvs/ProgramTheWorld/bin/python "/Users/nitin_bodke/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-0/192.6262.63/PyCharm.app/Contents/helpers/pydev/pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 56334 --file /Users/nitin_bodke/lab/ProgramTheWorld/fibonacci.py
1
1
2
3
4
5
pydev debugger: process 55615 is connecting

Traceback (most recent call last):
File "/Users/nitin_bodke/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-0/192.6262.63/PyCharm.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_process_net_command.py", line 864, in process_net_command
py_db.writer.add_command(cmd)
File "/Users/nitin_bodke/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-0/192.6262.63/PyCharm.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 348, in add_command
self.cmdQueue.put(cmd)
AttributeError: 'Queue' object has no attribute 'put'
Traceback (most recent call last):
File "/Users/nitin_bodke/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-0/192.6262.63/PyCharm.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_process_net_command.py", line 864, in process_net_command
py_db.writer.add_command(cmd)
File "/Users/nitin_bodke/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-0/192.6262.63/PyCharm.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 348, in add_command
self.cmdQueue.put(cmd)
AttributeError: 'Queue' object has no attribute 'put'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/nitin_bodke/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-0/192.6262.63/PyCharm.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 311, in _on_run
self.process_command(cmd_id, int(args[1]), args[2])
File "/Users/nitin_bodke/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-0/192.6262.63/PyCharm.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 326, in process_command
self.process_net_command(self.global_debugger_holder.global_dbg, cmd_id, seq, text)
File "/Users/nitin_bodke/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-0/192.6262.63/PyCharm.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_process_net_command.py", line 882, in process_net_command
py_db.writer.add_command(cmd)
File "/Users/nitin_bodke/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-0/192.6262.63/PyCharm.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 348, in add_command
self.cmdQueue.put(cmd)
AttributeError: 'Queue' object has no attribute 'put'
Can't process net command: 501 1 0.1 UNIX
Traceback (most recent call last):
File "/Users/nitin_bodke/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-0/192.6262.63/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 2060, in <module>
main()
File "/Users/nitin_bodke/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-0/192.6262.63/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 2054, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "/Users/nitin_bodke/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-0/192.6262.63/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 1358, in run
time.sleep(0.1) # busy wait until we receive run command
KeyboardInterrupt

Process finished with exit code 1

</snip>

When I run this program, I am getting correct output:

<snip>

/Users/nitin_bodke/.virtualenvs/ProgramTheWorld/bin/python /Users/nitin_bodke/lab/ProgramTheWorld/fibonacci.py
34
89
0

Process finished with exit code 0

</snip>

Here is my fib program, but IMO this has nothing to do with code I am running:

fibonacci.py:

"""Implement a function recursively to get the desired
Fibonacci sequence value.
Your code should have the same input/output as the
iterative code in the instructions."""

def get_fib(position):
if (position == 0):
return 0
elif position == 1:
return 1
else:
return get_fib(position-1) + get_fib(position-2)


# Test cases
print(get_fib(9))
print(get_fib(11))
print(get_fib(0))
0
Comment actions Permalink

@Nitin Bodke

I wonder what project interpreter are you using? 

Do you get the issue if you debug a one-line script like `print('hello world')`?

0
Comment actions Permalink

I am using Python 3.6 interpreter. Below is screen shot of interpreter settings. But when I change interpreter to 2.7 i.e. I am not getting error in debugging.

I can reproduce same issue with one-line script `print('hello world')`.

0
Comment actions Permalink

Very strange. Seems very similar to this issue: https://youtrack.jetbrains.com/issue/PY-31228

Do you get the same issue if you rename your script file to something else?

Do you get the issue if you create a new interpreter (with a new virtualenv for example)?

0

Please sign in to leave a comment.