コード例 #1
0
        static void Main(string[] args)
        {
            var debugger = new V8DebugClient();

            Console.Write(debugger.ReadResponse());
            
            debugger.SendRequest(new
            {
                seq = 1,
                type = "request",
                command = "scripts"
            });

            Console.Write("*" + debugger.ReadResponse() + "*");
            Console.Write("*" + debugger.ReadResponse() + "*");
            Console.Write("*" + debugger.ReadResponse() + "*");

            Console.Write("\n\n[Press Enter to exit]...");
            Console.Read();
        }
コード例 #2
0
        static void Main(string[] args)
        {
            var debugger = new V8DebugClient();

            var testPacketSent = false;

            while (true)
            {
                if (testPacketSent)
                {
                    var response = debugger.ReadResponse();

                    if (response != null)
                    {
                        Console.Write(response);
                    }
                }

                if (!testPacketSent)
                {
                    debugger.SendCommand("{ \"seq\": 1, \"type\": \"request\", \"command\": \"scripts\" }");
                    testPacketSent = true;
                }
                    

                Thread.Sleep(0);
            }


            Console.WriteLine("\nDone.");
            Console.Read();
        }