breakpoint()は、Pythonのコードを一時停止してデバッグできる組み込み関数です。 実行すると、この位置でプログラムが停止し、**対話的にデバッグできるモード(pdbデバッガ)**に入ります。 (Pdb) プロンプトが表示されたら、コマンドを入力できます。
Start JLab and open a notebook connected to the IPyKernel debugger Add more than one line of code to a cell, and try setting breakpoints on any line except the first one. Notice that the breakpoints ...
import threading def test(): print(f" hello from {threading.current_thread().getName}") # breakpoint 1 ts = [] for i in range(5): t = threading.Thread(target=test) t.setName(f"thread no. {i}") ...