You can't copy the uri or any other information there in network tools
<-- Please describe your problem here. Be sure to include repro steps. -->
You can't copy the uri or any other information there in network tools
DevTools version: 2.34.3 IDE: VSCode Connected Device: CPU / OS: arm64 (64 bit) ios Connected app type: Flutter native (debug build) Dart Version: 3.4.0 Flutter Version: 3.22.0 / stable Framework / Engine: 5dcb86f68f / f6344b75dc
Could you try with latest stable Flutter version and therefore latest stable DevTools version?
Could you try with latest stable Flutter version and therefore latest stable DevTools version?
I updated but I still can't copy it
Are you trying to copy from the Network profiler while embedded in VS Code? Also how are you trying to copy (ctrl / cmd + C, right-click + copy)?
CC @DanTup do we expect our post message workaround to be robust? If not, under what conditions is copying from VS code expected to be broken? is there anything we can do to push harder on VS Code here to fix the underlying issues?
Are you trying to copy from the Network profiler while embedded in VS Code? Also how are you trying to copy (ctrl / cmd + C, right-click + copy)?
CC @DanTup do we expect our post message workaround to be robust? If not, under what conditions is copying from VS code expected to be broken? is there anything we can do to push harder on VS Code here to fix the underlying issues?
I've been trying both ways you mentioned, but to no avail.
Facing same issue. Needs fix
CC @DanTup do we expect our post message workaround to be robust? If not, under what conditions is copying from VS code expected to be broken? is there anything we can do to push harder on VS Code here to fix the underlying issues?
The workaround is only for explicit calls to postMessage with command: "clipboard-write" (copyToClipboardVSCode()) which is used by the copy button in DevTools. Unfortunately keys like Cmd+C (and even Cmd+A) just don't seem to work at all in webviews in VS Code (although only for macOS, everything is fine for other OSes). Unfortunately I haven't been able to come up with any other workaround to capture the keypresses to try and do something ourselves (we basically never hear about the keypress, like something else has swallowed it).
The related VS Code issue is at https://github.com/microsoft/vscode/issues/129178 and I made a repro of the issue for it (without DevTools) at https://github.com/DanTup/vs-code-webview-copy-paste.
I think the best way to raise the priority for VS Code would be to get more 👍 's on https://github.com/microsoft/vscode/issues/129178. There are a lot of other issues that have been closed as a dupe of it, but it only has 41 so far.
There is also a slightly related issue in Flutter at https://github.com/flutter/flutter/issues/142040, where you can select text without it having focus, so pressing Ctrl+C can copy something different (or nothing). I don't know which of the two issues are affecting those posting above though (if not on macOS, probably the latter, but otherwise probably the VS Code issue).
@elliette since this is a big complaint from our users, WDYT about adding copy buttons for each tab for a specific request/response?
- Response tab has an existing Copy-to-clipboard button.
- Request tab has an existing Copy-to-clipboard button, if there is a request body.
- Headers tab does not. This tab has 3 collapsible sections (at least?) inside, displayed vertically: General, Response Headers, Request Headers. Maybe each section can get it's own copy button.
- Overview tab does not.
I would suggest we use the same copy button for all tabs which is displayed for the response / request tabs but make it more discoverable. Currently the UI is not great. I think if we got rid of the outline around the auto/text dropdown (which I also think should have a tooltip to make it more clear what it does), added a bit more padding between the dropdown and copy button, and turned it into an icon+text button 📋 Copy response that would help a lot with discoverability.
Along with this, I think every item in each panel should have a copy button as well, aligned to the right of the screen. E.g.
I also think we should update the "copy" button in the table:
- Add "Actions" to the column header
- Instead of the three-dots that show up when you hover make it an explicit dropdown
- Add more options (e.g. "Copy all"
- Make sure it works for socket requests too (does not show up for sockets)
@elliette @srawlins I have a fix for Cmd+C when embedded in VS Code at https://github.com/flutter/devtools/pull/9472, but I haven't marked is as fixing this issue because I'm not sure if everything you might want to copy is selectable here, so you might still want to make changes.