CS50-更新后工作

发布于 2025-02-12 05:47:09 字数 808 浏览 0 评论 0原文

runoff/ $ debug50 ./runoff a b c
Launching VS Code debugger...
Traceback (most recent call last):
  File "/usr/local/bin/debug50", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/site-packages/debug50/__main__.py", line 72, in main
    asyncio.get_event_loop().run_until_complete(launch(args.PROGRAM, extra_args))
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.10/site-packages/debug50/__main__.py", line 90, in launch
    source = list(filter(lambda source_file: program in source_file, get_source_files(program)))[0]
IndexError: list index out of range

在更新CS50的Web IDE之后,每当我尝试启动Debug50时,我都会遇到此错误。我不知道该怎么办。正常工作。

OBS:我设置了断点,我没有错过这部分。

runoff/ $ debug50 ./runoff a b c
Launching VS Code debugger...
Traceback (most recent call last):
  File "/usr/local/bin/debug50", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/site-packages/debug50/__main__.py", line 72, in main
    asyncio.get_event_loop().run_until_complete(launch(args.PROGRAM, extra_args))
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.10/site-packages/debug50/__main__.py", line 90, in launch
    source = list(filter(lambda source_file: program in source_file, get_source_files(program)))[0]
IndexError: list index out of range

After I updated the web IDE for CS50, I keep getting this error whenever I try to launch debug50. I don't know what to do. It was working just fine.

Obs: I'm setting the breakpoints, I didn't miss this part.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

与往事干杯 2025-02-19 05:47:10

我遇到了同一问题。我想知道是否已经对Debug50进行了更新。这就是我的工作方式。

只要您在包含程序的目录中,尝试从命令行脚本省略./

例如
debug50径流AB C

I ran into this same issue. I'm wondering if an update to debug50 has been made. Here's how I got it to work.

Try omitting the ./ from your command line script, so long as you are in the directory containing your program.

e.g.
debug50 runoff a b c

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文