简体   繁体   English

在 vsCode 中运行 dart 终端

[英]Running dart terminal in vsCode

I am trying to create a Dart terminal.我正在尝试创建一个 Dart 终端。 So i can use terminal rather than the Debug Console in Visual Studio Code.所以我可以在 Visual Studio Code 中使用终端而不是调试控制台。

I have already added the terminal statement in launch.json file to work with terminal.我已经在launch.json文件中添加了终端语句以使用终端。 Even with the change shown in the picture below, i can not see dart terminal.即使有下图所示的更改,我也看不到 dart 终端。 screen from vs code从 vs 代码中筛选

The menu in your screenshot is the menu for creating a new terminal.屏幕截图中的菜单是用于创建新终端的菜单。 Running a Dart script in the terminal will not cause it to appear in this "new terminal" menu, it will instead just start running the Dart process inside the active terminal window.在终端中运行 Dart 脚本不会使其出现在这个“新终端”菜单中,它只会在活动终端窗口内开始运行 Dart 进程。

If you add "console": "terminal" to the launch.json and then run the project with F5 , it should start running your app inside the terminal automatically.如果您将"console": "terminal"launch.json然后使用F5运行项目,它应该会自动开始在终端内运行您的应用程序。 You'll know this is working by the full command line that the Dart extension is running being printed in the terminal as the process is started.你会知道这是通过完整的命令行工作的,当进程开始时,Dart 扩展正在运行并在终端中打印出来。

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

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