devtools
devtools copied to clipboard
Abort current connection and try with new input
What problem does this feature solve?
Currently when connecting (at least when using dependency package) you cannot abort a connection attempt and try again.
I am working on an app where we want to dynamically connect to devtools, by inputting the host and port in a dialog. However when you have done this once, and you perhaps made a mistake, you have to restart the app to try again, because the second time you call devtools.connect()
nothing happens. The console keeps periodically outputting errors with the host and port you used the first time, regardless of additional calls to devtools.connect()
with new arguments.
What does the proposed API look like?
Add an .abort()
function to cancel any active connection, or stop ongoing connection attempts.
Run .abort()
every time .connect()
is called for convenience.