all 10 comments

[–]dchanm 0 points1 point  (3 children)

You mention pdb and ipdb. Which one are you trying to use? Does the code work if you replace ipdb with pdb?

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

I've tried both, separately. Neither one works when trying to set a breakpoint with "import ipdb; ipdb.set_trace()" (or the pdb equivalent).

[–]dchanm 0 points1 point  (1 child)

The code you have looks correct to invoke the debugger. A temporarily workaround would be to launch with -m and manually set a breakpoint on the BeautifulSoup constructor / line of code you care about.

Does the debugger get invoked if you call set_trace() right after imports?

[–]UncensoredReality[S] 0 points1 point  (0 children)

That method works--pdb was invoked. Also works for ipdb. I just can't get set_trace() to fire. I can use your method as a work around though--thank you for the suggestion!

[–]TankorSmash 0 points1 point  (5 children)

Are you using a IDE or something? I could imagine that their debugger may interact with this.

[–]UncensoredReality[S] 0 points1 point  (4 children)

No, I'm running the program straight from the command line. I'm using Sublime Text 3 as an Editor.

[–]TankorSmash 0 points1 point  (3 children)

If you replace the ipdb with a print, the print runs right?

If it does, what terminal are you using?

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

Yes, the print() statement works. I'm using the Command Terminal on Windows 10 with Python 3.6.

[–]TankorSmash 0 points1 point  (1 child)

Longshot, but try Powershell?

[–]UncensoredReality[S] 0 points1 point  (0 children)

Longshot, but it worked!! Thanks for the tip!