Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clearscript 5.5.1.1 and Chrome Developer Tools support #42

Closed
helloIAmPau opened this issue Jan 23, 2018 · 4 comments
Closed

Clearscript 5.5.1.1 and Chrome Developer Tools support #42

helloIAmPau opened this issue Jan 23, 2018 · 4 comments
Assignees

Comments

@helloIAmPau
Copy link

Hello all,
I've recently updated the ClearScript version from 5.5.0 to 5.5.1.1 and now I'm not able to debug my javascript code by using Chrome Developer Tools anymore.
Every time I try to connect to an engine using the CDT, a WebSocket connection is established and then closed by chrome as soon as the first message is received.

From a brief analysis seems to be an issue connected to the new WebSocket implementation.

I can reproduce the issue with the following steps:

  1. I create a minimal test console application:
using Microsoft.ClearScript.V8;
using System;

namespace Minimal
{
    class Program
    {
        static void Main(string[] args)
        {
            using (var engine = new V8ScriptEngine(V8ScriptEngineFlags.EnableDebugging | V8ScriptEngineFlags.EnableRemoteDebugging, 9876))
            {
                Console.WriteLine(engine.Evaluate("'Press enter to send debug command';"));
                Console.ReadKey();
                engine.Evaluate("debugger;");
            }
        }
    }
}
  1. while the console application is waiting for a key, I open chrome at URL:
    http://127.0.0.1:9876/json/list
  2. then I use the devtoolsFrontendUrl to start debugging the engine

My solution, for now, is to downgrade ClearScript version.

Thanks

@ClearScriptLib ClearScriptLib self-assigned this Jan 23, 2018
@ClearScriptLib
Copy link
Collaborator

Hi @helloIAmPau,

We've confirmed that manually entering the CDT front end URL into the Chrome address bar currently doesn't work. We're investigating.

In the meantime, you can configure chrome://inspect to monitor your host and port, and launch CDT from there. That works and is the recommended procedure for launching CDT with ClearScript 5.5.1 and later.

Thanks for reporting this!

@helloIAmPau
Copy link
Author

Hello @ClearScriptLib,
thank you for your hint, but I cannot use the chrome automatic detection in my developing workflow, so I'll wait for updates.

Thank you

@helloIAmPau
Copy link
Author

The issue is for me closed!

Thank you.

@ClearScriptLib
Copy link
Collaborator

Great to hear. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants