Esempio n. 1
0
        static void Main(string[] args)
        {
            var debugger = new V8DebugClient();

            debugger.SendRequest(new
            {
                seq = 1,
                type = "request",
                command = "scripts"
            });
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            var debugger = new V8DebugClient();

            var testPacketSent = false;

            while (true)
            {
                if (testPacketSent)
                {
                    var packet = debugger.Stream.ReadPacket();

                    if (packet != null)
                    {
                        Console.Write(debugger.DecodePacket(packet));
                    }
                }

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

                Thread.Sleep(0);
            }


            Console.WriteLine("\nDone.");
            Console.Read();
        }
Esempio n. 3
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();
        }
Esempio n. 4
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();
        }