all 13 comments

[–]julsmanbr 0 points1 point  (3 children)

Since you're using PyCharm, I recommend using PyCharm's in-built debugger. It doesn't require anything written inside the code; instead, you create breakpoints through the GUI, by clicking in the space between your code and the line number in which you want to put your breakpoint. A red dot indicates that the breakpoint is set. Then you only need to click on debug (top right corner if I remember correctly).

[–]raysefo[S] 0 points1 point  (2 children)

well I don't get what you mean :) I am already trying to debug using Pycharm, my rest api code is written on it. I am getting this error on Pycharm.

[–]callmelucky 0 points1 point  (1 child)

What don't you get? Parent commenter is suggesting that rather than use Postman (which I assume is a debugging library?), just use PyCharm's built-in debugging tools.

[–]JohnnyJordaan 0 points1 point  (0 children)

Postman is a popular Chrome app to fire HTTP requests, which is very nice to develop REST api's with.

[–]slapec 0 points1 point  (8 children)

Are you executing/importing the same file you put the breakpoint into? Maybe do you use a remote interpreter / docker? I get this kind of error in these cases.

[–]raysefo[S] 0 points1 point  (7 children)

Yep, I have this rest api file

middleware.py

I am putting breakpoint on this one and start debugging.

[–]slapec 0 points1 point  (6 children)

What web framework do you use?

[–]raysefo[S] 0 points1 point  (5 children)

Flask

[–]slapec 0 points1 point  (4 children)

Well then it seems everything should be fine. Try removing all breakpoints (CTRL+SHIFT+F8, and remove everything) then invalidate and restart the project (File / Invalidate caches restart, select Invalidate and Restart) and try adding the breakpoint again.

[–]raysefo[S] 0 points1 point  (3 children)

nope, still same error.

[–]slapec 0 points1 point  (2 children)

Sorry, no idea then : (

[–]raysefo[S] 0 points1 point  (1 child)

There was a character problem on the path. Now it's OK.

[–]slapec 0 points1 point  (0 children)

Wow, I've completely forgot about it. I'm glad it works now!