Closed unknowledgeable closed 4 years ago
Right now I’m getting devtools from port 9100, can you try flutter pub global run devtools
and see what port is it actually running on please? Thanks!
I initially had:
No active package devtools.
pub finished with exit code 65
So I looked around and ran:
flutter pub global activate devtools
I got a message that I should add this to my $PATH
$HOME/Developer/flutter/.pub-cache/bin
It's saying it's at port 9100
I'm a bit lost now though as I've now got both of these in my $PATH:
$HOME/Developer/flutter/bin
$HOME/Developer/flutter/.pub-cache/bin
Is that how it should be setup? How was devtools working before? Sorry if it's off topic but I'm starting to feel like I've got no idea what I'm doing!
So I looked around and ran:
flutter pub global activate devtools
Good call, I should actually add that to README.
When you run the CocCommand openProfiler
that opens devtools, did devtools
actually get opened? If your devtools
was opened, then your PATH
should be configured correctly
I'm looking into the [VERBOSE-2:profiler_metrics_ios.mm(184)] Error retrieving thread information: (ipc/send) invalid destination port
issue.
Based on this issue, I think the [VERBOSE-2:profiler_metrics_ios.mm(184)]
error is not an issue that this extension caused but rather an issue that Flutter 1.20 has brought. Although I can't reproduce this issue on my end, I think that by setting "flutter.trace.server" to off
might suppress the error message that you were seeing. Please let me know if that has any effect @unknowledgeable
My configuration:
When you run the CocCommand
openProfiler
that opens devtools, diddevtools
actually get opened? If yourdevtools
was opened, then yourPATH
should be configured correctly.
Yeah and that's why I'm confused, do I have two versions of devtools in different places now that I ran flutter pub global activate devtools
? Thanks for your help on this though, I'll do some more digging around instead of bothering you about it.
I think that by setting "flutter.trace.server" to
off
might suppress the error message that you were seeing. Please let me know if that has any effect
Thanks @theniceboy, I'll report back if I see it again. Anything to be wary of by setting it to off
or is that safe to leave off?
@unknowledgeable I think that your devtools might have stopped working because you updated flutter (so that you had to re-activate it). Please let me know if you have any more difficulties on that.
About the ”flutter.trace.server”
setting, I’ve actually never really look into what this setting really does, because I thought that it’s for debugging the coc-flutter
extension itself. I’ve always had it off
and it’s off by default. So I think it’s safe to leave it off. I’ll look into the code and get back to you on what does the setting actually do.
@unknowledgeable I've checked the code and I've deleted this option from readme. flutter.trace.server
controls how much log that this extension produces. It's used to debug this extension.
Btw I've added a feature to this extension. You can try it out with :CocCommand flutter.outline
!
Great thanks for letting me know, I haven't had much time to test so apologies for not closing the issue yet.
Btw I've added a feature to this extension. You can try it out with
:CocCommand flutter.outline
!
OH DAMN!! That's cool as hell! This thing's on track to becomming a full blown Flutter IDE! Great work!
Here are a couple of things I noticed that you might want to think about, I'll post screenshots too in case there are things you notice that aren't behaving as you'd expect:
autocmd BufEnter * if (winnr("$") == 1 && &filetype == 'coc-explorer') | q | endif
here's a similar one that NERDTree uses if that helps:
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
Loving the work you're putting in to this, I hope my feedback is useful!
@unknowledgeable Hey thank you so much!!! I really appreciate your feedback and it’s super helpful! I’ve added the CocCommand description, and fixed the line number issue (classic off by one lol). More importantly I made it so that the outline window will close when it becomes the last window in the current tab page. I used coc notifications instead of autocmds because coc notifications are remote thus won’t affect your vim’s performance. I also made the out line buffer invisible. Either way, thank you so much for the helpful feedback! Thanks to you this extension has become more useful to me as well!
Nice! I'm glad I'm helping in the small way I can!
Another couple of things:
If I have both coc-explorer and the widget tree open and close the buffer I'm working on then it doesn't close either the explorer or the widget tree. I assume both are checking if they're the last open buffer and each thinking they aren't.
I'm currently struggling with is trying to get airline to look better at the bottom of the window (I'm being a pedant because I'm procrastinating and trying to make everything look pretty instead of actually doing work haha).
I currently have this setup:
let g:airline_filetype_overrides = {
\ 'defx': ['defx', '%{b:defx.paths[0]}'],
\ 'gundo': [ 'Gundo', '' ],
\ 'help': [ 'Help', '%f' ],
\ 'minibufexpl': [ 'MiniBufExplorer', '' ],
\ 'nerdtree': [ get(g:, 'NERDTreeStatusline', 'NERD'), '' ],
\ 'startify': [ 'Startify', '' ],
\ 'coc-explorer': ['Explorer',''],
\ }
I did :echo &filetype
to be able to modify the coc-explorer airline bar but when I do :echo &filetype
on the widget tree I get nothing back. Is that something that's possible to do or should I just get back to work and stop faffing?
Currently, I'm only counting windows in the current tab page when your cursor goes to the outline buffer. When the count is 1, I close the outline window. I'll try to implement window filtering in the future to exclude windows such as coc-explorer
, nerdtree
when counting. I do have to do some research on how to reliably exclude them tho.
I added a filetype to the outline window. Now flutter outline buffers should have the filetype flutterOutline
. Enjoy~
Ok I've worked on a project for long enough now and haven't seen the error of the original topic here so I'll close this. I've got a few other bits about the flutterOutline that I'll open in a new issue. Thanks!
Awesome! Thanks! Please do a :CocUpdate
. There are some more quality of life changes on flutter outline.
Unfortunately, just started getting this error again:
[VERBOSE-2:profiler_metrics_ios.mm(184)] Error retrieving thread information: (ipc/send) invalid destination port
Doesn't seem to affect anything I'm doing, DevTools is working fine etc
I suppressed this error from showing up as floating notifications. I don't think this error will have any effect on production.
Describe the bug
Not sure what this means so not sure if it's a problem with the coc-extension or my dart config or even a problem at all but I've had this message pop up a in the DevLog few times after writing my buffer:
To Reproduce
not 100% on this and can't reproduce all the time but last time I was just testing and did:
Expected behavior
no error
Desktop (please complete the following information):
Output channel:
"flutter.trace.server": "verbose"
:CocList output
open output list and selectflutter
Log:
I did the above and the output is over 18k lines so not sure if that's what you really want!