Cannot set break points on simple python project

Hello,

Currently I'm evaluating PyCharm and debugging functionality is limited: I cannot set breakpoints, menu is simply disabled(ctrl+F8 shortcut doesnt work). I'm using Ubuntu 13.10 with latest patches. Python version:

python –version
Python 2.7.5+

uname -a
Linux Boss 3.11.0-15-generic #23-Ubuntu SMP Mon Dec 9 18:17:04 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

I followed configuration instructions on JetBeans help.

Regards,
Darek
6 comments
Comment actions Permalink
Do you have Python setup correctly (i.e. can you run python scripts from your project within PyCharm)? Breakpoints are set by clicking into the border, next to the line numbers. That should result in a red circle. That also doesn't work?
0
Comment actions Permalink
Hello,

Yes, I can run my python project from command line and from PyCharm itself, I can even debug this project if python exception is thrown. The red circle doesnt show up.

This is community edition, but I have exactly the same problem with trial of Profesional Edition.


image1

image2

image3
0
Comment actions Permalink
Sorry, no idea. But maybe support can help you? Let me know, if you find out what the reason could be for such behavior is. I'm curious how to fix that.
0
Comment actions Permalink
Hi there,

The debugging (as well setting breakpoints etc) works with supported file types only.

Thing is: file on screenshot is NOT a Python file from PyCharm point of view. Yes, it has .py extension and executes just fine.. but NOT from IDE point of view (it has no syntax highlighted etc).

If you look at icon next to the file – it's not Python icon (like other *.py files on your screenshot have). It's an icon of the text file.

To resolves it: "Settings | File Types | Text files" – find and delete unwanted pattern there (bottom list; I would expect this to be something like pylxc or very similar).

More on this (why it have happened) – http://stackoverflow.com/a/21281563/783119

After you do that you should be able to debug it (set breakpoints etc should work again).
1
Comment actions Permalink
Ah, I missed that. I just looked at __init__.py and thought "ok, file extension is properly associated". I didn't notice that pylx.py is not recognized as Python file. Thanks for pointing that out! That's probably the case why it is not working!
0
Comment actions Permalink
Hello,

First of all thank You for your help, I dont know why but pylxc.py was in Text Files section as on screenshot below. Now everything works good. Thank You.

image1

image2

image3
0

Please sign in to leave a comment.