VS Code 1.36.1 tells me in the right bottom corner pop-up:
The DevTools service failed to register. Please raise a bug against the Dart extension for VS Code.
So I do. I am running debian 9. Where can I find a log ffor this?
It seems like your version of DevTools may be out of date. Can you run pub global list from a terminal? If pub isn't in your path, you can find it at bin/cache/dart-sdk/pub within the Flutter SDK folder.
It looks like we may also show this if it takes more than 500ms to respond.
/home/frank/development/flutter/bin/cache/dart-sdk/bin/pub global list gave me devtools 0.1.2
@hasenbalg can you reproduce this reliably, or was it just a one-off?
If you can repro - try running the Dart: Capture Logs command from the VS Code command palette, then try to launch DevTools, then click Stop Logging when you get the message, and paste the log here. Thanks!
https://pastebin.com/X73sZUpV Thank you!
Oops, my instructions were bad. We don't actually check for devtools at the time you launch it, we keep track of the service extensions as they launch - so we need the log earlier (during the sessions start).
Can you try:
F5The log might be much bigger because we'll put Flutter in to verbose mode during logging, but it should contain more useful info. Thanks!
https://gist.github.com/hasenbalg/1ba30cc569fb15d9f738204858758830
Here is log, Thank you!
Thanks, that has the info I needed 馃憤
@devoncarew @jacob314 this looks like it's failing because DevTools is trying to call registerService:
[11:43:09 AM] [CommandProcesses] [Info] <== {"event":"server.started","method":"server.started","params":{"host":"127.0.0.1","port":41495,"pid":29954}}
[11:43:09 AM] [CommandProcesses] [Info] ==> {"id":"1","method":"vm.register","params":{"uri":"http://127.0.0.1:44373/iZrRLjU_Xac=/"}}
[11:43:09 AM] [CommandProcesses] [Info] <== {"id":"1","error":"Unable to connect to VM service at http://127.0.0.1:44373/iZrRLjU_Xac=/: Method not found (-32601) from registerService()"}
My guess is that this is because a new vm_service_lib was published which uses the new (public) API, and because DevTools doesn't pin to exact versions, global activating devtools right now is pulling the latest version of vm_service_lib.
I think the vm_service_lib version number should've been bumped as a major change and/or devtools and devtools_server should pin to exact versions of everything.
I'm not sure there's a quick fix here unless we're ready to publish a build of DevTools that switches based on the version.
@hasenbalg as a workaround, if you see "DevTools" in the status bar, hover your mouse over it and it should say "Dart DevTools running at (url)". If you note the port number in there, you should be able to manually open it in your browser. It'll then need a VM Service URL in order to connect - you can get this by running the Open Observatory command in VS Code - it'll open Observatory in a browser - just grab the URL (then you can close Observatory) and paste it into DevTools.
It's not a particularly nice workaround, but it may let you use DevTools while we fix this.
@DanTup I guess "DevTools" supposed be next to Ln,Col in the status bar but it is not. So I guess it is not running. The "Open Observatory" gave me a new browser window as you sayed. Is the status bar the only way to get DevTools port? Thank you!
@hasenbalg Oh yeah, looks like we don't add it if an error occurs at startup. You could instead run it from the terminal yourself (pub global run devtools).
Awesome! Thanks a lot! I put the url /home/frank/development/flutter/bin/cache/dart-sdk/bin/pub global run devtools gave me in the browser and pasted the url from the Observatory under "Connect to running app".
This has been fixed. Run:
/home/frank/development/flutter/bin/cache/dart-sdk/bin/pub global run devtools global activate devtools
from the terminal which will update you to v0.1.3 of devtools, then restart VS Code and everything should be good. Apologies for the inconvenience!
/home/frank/development/flutter/bin/cache/dart-sdk/bin/pub global activate devtools updated fine. The DevTool is a big help to me. Thanks a lot!
Great, thanks for confirming!