我可以直接從 IntelliJ 運行這個 Python 測驗:
from unittest import TestCase
class TestDebug(TestCase):
def test_debug(self):
print("test")
輸出:
/Users/work/dev/venv/bin/python3 "/Users/work/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/213.5744.223/IntelliJ IDEA.app.plugins/python/helpers/pycharm/_jb_unittest_runner.py" --target test_debug.TestDebug
Testing started at 9:45 AM ...
Launching unittests with arguments python -m unittest test_debug.TestDebug in /Users/work/dev/tests
Ran 1 test in 0.001s
OK
Process finished with exit code 0
test
但是,在除錯模式下運行它時,它會失敗并顯示以下輸出:
/Users/work/dev/venv/bin/python3 "/Users/work/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/213.5744.223/IntelliJ IDEA.app.plugins/python/helpers/pydev/pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 57545 --file "/Users/work/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/213.5744.223/IntelliJ IDEA.app.plugins/python/helpers/pycharm/_jb_unittest_runner.py" --target test_debug.TestDebug
Testing started at 9:45 AM ...
Connected to pydev debugger (build 213.5744.223)
Process finished with exit code 138 (interrupted by signal 10: SIGBUS)
Empty suite
Empty suite
任何幫助表示贊賞!
uj5u.com熱心網友回復:
這似乎是由Cython 問題引起的。您可以通過在運行/除錯配置或環境中設定以下內容來解決此問題:
PYDEVD_USE_CYTHON=NO
PYDEVD_USE_FRAME_EVAL=NO
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/401290.html
上一篇:打字稿谷歌地圖錯誤
