gdbgui icon indicating copy to clipboard operation
gdbgui copied to clipboard

Can't paste to gdb prompt/terminal

Open tlc opened this issue 4 years ago • 15 comments

Describe the bug Can't paste to gdb prompt/terminal

To Reproduce

  1. Run gdbgui -r --args ....
  2. Open browser on remote host.
  3. Everything looks good. I can type in the lower/left terminal box and interact with gdb. I can hover over vars. RHS works.
  4. See messages in lower center box: "Copy/Paste available in all terminals with ctrl+shift+c, ctrl+shift+v"
  5. Try to paste into lower left gdb terminal with ctrl+shift+v, numerous other *-v, firefox right button menu.
  6. 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

tlc avatar Jan 20 '21 03:01 tlc

The same behavior is seen with google chrome.

tlc avatar Jan 20 '21 04:01 tlc

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.

tlc avatar Jan 20 '21 04:01 tlc

+1

pecastro avatar Feb 28 '21 22:02 pecastro

+1 on centos7 + firefox

david0u0 avatar May 10 '21 06:05 david0u0

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.

david0u0 avatar May 12 '21 02:05 david0u0

+1

YinLiu-91 avatar Jun 03 '21 16:06 YinLiu-91

The same behaviour is present with Microsoft Edge on Windows.

thesummer avatar Jun 22 '21 12:06 thesummer

+1 with Chrome / FireFox / Safari on MacOS

retme7 avatar Jul 21 '21 13:07 retme7

+1

Camio1945 avatar Dec 05 '21 03:12 Camio1945

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 -

gmccollister avatar Nov 16 '22 15:11 gmccollister

+1 with Chrome

aeropia avatar Feb 07 '23 12:02 aeropia

+1 with brave

gou4shi1 avatar Jan 24 '24 12:01 gou4shi1

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.

vw-phantom avatar Feb 02 '24 20:02 vw-phantom