Debug Dart at External Terminal

Posted jebediahkerman

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Debug Dart at External Terminal相关的知识,希望对你有一定的参考价值。

launch.json

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Dart",
            "type": "dart",
            "request": "attach",
            "preLaunchTask": "launch",
            "observatoryUri": "http://127.0.0.1:8181"
        }
    ]
}

tasks.json

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "launch",
            "type": "shell",
            "command": "DartLauncher",
            "args": [
                "--enable-vm-service",
                "--pause_isolates_on_start",
                "${file}"
            ]
        }
    ]
}

DartLauncher.cs

using System;
using System.Diagnostics;
using System.Linq;

namespace DartLauncher
{
    class DartLauncher
    {
        [STAThread]
        static void Main(string[] args)
        {
            new Process
            {
                StartInfo = new ProcessStartInfo
                {
                    FileName = "dart",
                    Arguments = String.Join(" ", args.Select((arg) => """ + arg + """))
                }
            }.Start();
        }
    }
}

 

以上是关于Debug Dart at External Terminal的主要内容,如果未能解决你的问题,请参考以下文章

exterior、interior ;internal、 external 这英语怎么读?

Can‘t exec “autopoint“: 没有那个文件或目录 at /usr/share/autoconf/Autom4te/FileUtils.pm line 345.

Can‘t exec “aclocal“: 没有那个文件或目录 at /usr/share/autoconf/Autom4te/FileUtils.pm line 326.

Can‘t exec “autopoint“: 没有那个文件或目录 at /usr/share/autoconf/Autom4te/FileUtils.pm line 345.

如何修复 Flutter 中的“Checking Dart SDK version... << was unexpected at this time”错误?

控制网络中AT指令是啥啦?怎么运用啦?