gdbgui
gdbgui copied to clipboard
Can't paste to gdb prompt/terminal
Describe the bug Can't paste to gdb prompt/terminal
To Reproduce
- Run
gdbgui -r --args .... - Open browser on remote host.
- Everything looks good. I can type in the lower/left terminal box and interact with gdb. I can hover over vars. RHS works.
- See messages in lower center box: "Copy/Paste available in all terminals with ctrl+shift+c, ctrl+shift+v"
- Try to paste into lower left gdb terminal with ctrl+shift+v, numerous other *-v, firefox right button menu.
- No form of paste works.
Expected behavior Paste should transfer data from my clipboard to the gdb prompt. I want to paste breakpoints ("b asdfasdfasd").
Please complete the following information:
- Ubuntu 18.04
- gdbgui 0.14.0.2
- gdb 8.1.1
- firefox on Ubuntu 20.04
# pipx list
venvs are in /root/.local/pipx/venvs
apps are exposed on your $PATH at /root/.local/bin
package gdbgui 0.14.0.2, Python 3.6.9
- gdbgui
## pipx runpip gdbgui freeze
Brotli==1.0.9
click==7.1.2
dnspython==2.1.0
eventlet==0.25.2
Flask==0.12.5
Flask-Compress==1.8.0
Flask-SocketIO==2.9.6
gdbgui==0.14.0.2
gevent==1.5.0
gevent-websocket==0.10.1
greenlet==0.4.16
itsdangerous==1.1.0
Jinja2==2.11.2
MarkupSafe==1.1.1
monotonic==1.5
pkg-resources==0.0.0
pygdbmi==0.10.0.0
Pygments==2.7.4
python-engineio==3.14.2
python-socketio==4.6.1
six==1.15.0
Werkzeug==0.16.1
The same behavior is seen with google chrome.
I can paste to fields in the Right Hand Side with ctrl-v (not ctrl+shift+v) or the browser's right button menu.
I can copy from any of the 3 terminal windows.
+1
+1 on centos7 + firefox
Well I found the cause is the function navigator.clipboard.readText, which is undefined in firefox. After some searching I found more info on https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/readText
Firefox only supports reading the clipboard in browser extensions, using the "clipboardRead" extension permission.
+1
The same behaviour is present with Microsoft Edge on Windows.
+1 with Chrome / FireFox / Safari on MacOS
+1
I also ran into this with Firefox on Arch Linux (Xorg). Here is a work around that worked for me in X11. You can bind it to a key combination or setup some other convenient way of calling it in your WM:
xclip -selection clipboard -out | tr \\n \\r | xdotool selectwindow windowfocus type --clearmodifiers --delay 25 --window %@ --file -
+1 with Chrome
+1 with brave
We are using firefox on Ubuntu 20.04, and this is in my opinion the biggest issue with gdbgui currently that makes it hard for me to recommend its use in our organization. Not being able to paste into the gdb window makes it extremely tedious to type really long commands/paths into it and slows down productivity.