Run code “partially” in debug mode in PyCharm

I'd like to run some Python code in debugger mode in PyCharm. My code includes an API function call, and for some reason, that single function call takes forever in debugger mode.

I really do not care about debugging that specific function, and having debugger skip over that function (only run it in regular mode) is fine. However, I'd like to be able run the rest of my code in debug mode.

Is this doable in PyCharm or is there any Python workaround?

# some code to be run in debugger mode, e.g.
func_a(obj_a) #this function modifies obj_a

# some API function call, super slow in debugger mode. can I just run this part in run mode? e.g.
obj_b = api_func(obj_a)

# rest of the code to be run in debugger mode e.g.
func_c(obj_b)
0

Please sign in to leave a comment.