gpt4 book ai didi

windows - 如何调试 .BAT 脚本?

转载 作者:可可西里 更新时间:2023-11-01 11:53:59 27 4
gpt4 key购买 nike

有没有办法单步执行 .bat 脚本?问题是,我有一个 build script ,它调用了很多其他脚本,我想看看它们被调用的顺序是什么,这样我就可以知道我必须去哪里并添加我的修改.

最佳答案

我不知道如何逐步执行 .bat 文件,但您可以使用 echopause 来帮助调试。

ECHO
Will echo a message in the batch file. Such as ECHO Hello World will print Hello World on the screen when executed. However, without @ECHO OFF at the beginning of the batch file you'll also get "ECHO Hello World" and "Hello World." Finally, if you'd just like to create a blank line, type ECHO. adding the period at the end creates an empty line.

PAUSE
Prompt the user to press any key to continue.

来源:Batch File Help

@workmad3:答案有更多关于使用 echo 命令的好技巧。

另一个有用的资源... DDB: DOS Batch File Tips

关于windows - 如何调试 .BAT 脚本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/165938/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com