This repository has been archived by the owner on May 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Provide programmatic access to the remote debugger port #13432
Comments
This is doable but you'll have to modify some core webkit classes so I don't know if that will be acceptable, but you can always fork. Anyway here you can catch the actual port number: void InspectorServerQt::listen(quint16 port)
{
if (m_tcpServer)
return;
m_tcpServer = new QTcpServer();
m_tcpServer->listen(QHostAddress::Any, port);
connect(m_tcpServer, SIGNAL(newConnection()), SLOT(newConnection()));
// this will give you the actual port number: m_tcpServer->serverPort()
} |
vitallium
pushed a commit
to vitallium/qtwebkit
that referenced
this issue
Jan 8, 2016
vitallium
pushed a commit
that referenced
this issue
Jan 8, 2016
Also print warning when remote debugger fails to bind to the specified port. Issue: #13432
Landed in master (14d53ce). Thanks! |
iradul
added a commit
to iradul/phantomjs
that referenced
this issue
Jan 14, 2016
Also print warning when remote debugger fails to bind to the specified port. Issue: ariya#13432
igorshapiro
pushed a commit
to WiserSolutions/phantomjs
that referenced
this issue
Sep 29, 2016
Also print warning when remote debugger fails to bind to the specified port. Issue: ariya#13432
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In the Dart test runner, we run PhantomJS as a subprocess for automatic testing. We want to support remote debugging, but the way our infrastructure works means it doesn't make sense for users to explicitly pass in a port. If we pass in a particular port number, that runs the risk of collisions or race conditions, so we'd like to pass in 0 to get the OS to auto-assign a free port. Unfortunately, once this happens, there's no way to figure out the actual port that was bound.
It would be great if the API would expose this port somehow if it's bound (for example,
phantom.remoteDebuggerPort
). This could also be useful for PhantomJS scripts reacting to the existence of a remote debugger or presenting the user with a link to one.The text was updated successfully, but these errors were encountered: