debugging 调试在CS50练习题上不起作用

slsn1g29  于 2023-02-04  发布在  其他
关注(0)|答案(1)|浏览(207)

尝试做CS50第一周的练习题“调试”。我已经一步一步重复了几个小时,似乎不能摆脱这个错误。
当我“make”调试时,我得到一个错误消息

The term 'make' is not recognized as the name of a cmdlet, function, script file, 
or operable program. Check the spelling of the name, or if a path was included, 
verify that the path is correct and try again..

我可以在www.example.com上运行Debugcode.cs50.io,但无法在Windows 11上的实际VS代码应用程序上运行Debug。我尝试将代码本身复制粘贴到code.cs50.io中,但出现此错误

make debug
debug50 ./debug

Can't debug this program! Are you sure you are running debug50 
on an executable, a Python script, or a Java program?
Unsupported File: ./debug

我是非常新的VS代码和编码一般,所以有人可以请解释给我听吗?

vshtjzan

vshtjzan1#

我做过cs50,但那是几年前的事了。我不记得我是在windows还是linux上做的。不管怎么说,我认为这里的线索是:
术语"make"无法识别为cmdlet、函数、脚本文件或可操作程序的名称。请检查名称的拼写;如果包含路径,请验证路径是否正确,然后重试。
如果你还没有安装make,那么你必须安装它。
试试看:
https://stackoverflow.com/a/57042516/11112270
如果您确实安装了它,则二进制可执行文件不在$PATH环境变量中。
试试看:
https://stackoverflow.com/a/44958882/11112270
我觉得,只要在linux上开发就可以了,因为它更容易得到你需要的工具。除非cs50需要windows?

相关问题