user746461
user746461

Reputation:

Do not open package source file if an error is thrown from package

import os


os.path.join(None,'')

I have the above code and I run it in PyCharm with debug mode. Clearly an exception will be thrown from os.path.join().

PyCharm will automatically open Lib\ntpath.py and highlight the line that throws the exception.

Can I ask PyCharm not to open package source code file and let PyCharm only focus on my project files?

Upvotes: 1

Views: 34

Answers (1)

mx0
mx0

Reputation: 7143

Open Debug window and click two red dots (View Breakpoints Ctrl+Shift+F8).

Then in left panel select Any exception from Python Exceptions Breakpoint and check Ignore library files.

Breakpoints

Upvotes: 1

Related Questions