码迷,mamicode.com
首页 > 其他好文 > 详细

Debug Dart at External Terminal

时间:2019-01-13 13:41:41      阅读:175      评论:0      收藏:0      [点我收藏+]

标签:name   pause   tps   space   proc   lin   intel   ola   new   

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

标签:name   pause   tps   space   proc   lin   intel   ola   new   

原文地址:https://www.cnblogs.com/JebediahKerman/p/Debug_Dart_at_External_Terminal.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!