简体   繁体   English

VSCode:编译后冻结

[英]VSCode: Freezes after compilation

I tried to compile VSCode source for the first time ever, I ran the "yarn run watch" command and eventually the compilation finished with the message "Finished Compilation with 0 errors" but then the console just gets stuck there.我第一次尝试编译 VSCode 源代码,我运行了“yarn run watch”命令,最终编译完成并显示消息“Finished Compilation with 0 errors”,但随后控制台就卡在那里了。 I tried using different consoles but still facing the same problem.我尝试使用不同的控制台,但仍然面临同样的问题。

在此处输入图像描述

I killed the process and had no later problems using VS Code from this build.我终止了这个过程,并且从此构建中使用 VS Code 没有遇到任何问题。

In the directory where vscode was cloned, I checked with du -s that nothing was changing over a few minutes of testing will the logging was stopped on your message above.在克隆 vscode 的目录中,我检查了du -s在几分钟的测试中没有任何变化,上面的消息将停止日志记录。

Having stopped yarn run watch I then carried out the next instruction of the build process: yarn watch .停止yarn run watch后,我执行了构建过程的下一条指令: yarn watch

This also hung with the same message.这也挂着同样的信息。 I used du again.我再次使用了du And again there was no change in the size of the directory.目录的大小也没有变化。 I stopped yarn watch and was then able to run vscode, editing files without a problem.我停止了yarn watch ,然后能够运行 vscode,毫无问题地编辑文件。

All custom commands like watch that you can yarn run are defined in the file package.json in the project root.您可以yarn run的所有自定义命令(如watch )都在项目根目录中的文件package.json中定义。 In this case, it's package.json on Github .在本例中,它是Github 上的 package.json Even before looking at it, I assumed from the name that what the command does is probably to build once and then go into a loop that watches for new changes and then rebuilds.甚至在查看它之前,我就从名称中假设该命令所做的可能是构建一次,然后进入一个循环,该循环监视新的更改然后重建。 In the section called scripts of package.json we see that watch is defined to be gulp watch --max_old_space_size=4095 .在名为scripts of package.json的部分中,我们看到watch被定义为gulp watch --max_old_space_size=4095 Google gulp watch, and you'll see that that's what it does. Google gulp watch,你会发现它就是这么做的。

I think you're looking for yarn run compile , which the vscode team setup to build the project once and then exit.我认为您正在寻找yarn run compile ,vscode 团队将其设置为一次构建项目然后退出。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM