Skip to content

Add Chrome debugging support - #315

Merged
ko1 merged 7 commits into
ruby:masterfrom
ono-max:add-chrome-debugging-support
Oct 14, 2021
Merged

ko1 merged 7 commits into
ruby:masterfrom
ono-max:add-chrome-debugging-support

Conversation

@ono-max

@ono-max ono-max commented Oct 2, 2021 •

Copy link
Copy Markdown
Member

It's sometimes hard for users to see big backtrace information in the terminal. To solve the problem, Chrome Devtools Frontend is one solution.

Screen.Recording.2021-09-28.at.21.16.06.mov

How to use

  1. Run with rdbg and enter open chrome.
    If you want to run it from the command line, you can use rdbg --open=chrome.
  2. Enter the URL which is outputted in the terminal in Google Chrome.
    In the following example, open devtools://devtools/bundled/inspector.html?ws=127.0.0.1:65124.
$ rdbg target.rb
[1, 4] in target.rb
=>   1| a=1
     2| b=1
     3| c=1
     4| d=1
=>#0	<main> at target.rb:1
(rdbg) open chrome    # command
DEBUGGER: wait for debugger connection...
DEBUGGER: Debugger can attach via TCP/IP (["#<Addrinfo: 127.0.0.1:65124 TCP>"])
DEBUGGER: Enter the following URL in Chrome:

devtools://devtools/bundled/inspector.html?ws=127.0.0.1:65124
  1. Click the Sources plane.

For more information about how to use Chrome debugging, you might want to read here

Acknowledgement

Many people helped me to create this PR.

@ono-max
ono-max force-pushed the add-chrome-debugging-support branch 4 times, most recently from f640d9f to 05b9e49 Compare October 2, 2021 11:03
@ono-max
ono-max force-pushed the add-chrome-debugging-support branch 6 times, most recently from 98edbd2 to c6f7246 Compare October 9, 2021 12:04
@ono-max
ono-max marked this pull request as ready for review October 9, 2021 12:07
@ono-max
ono-max force-pushed the add-chrome-debugging-support branch from c6f7246 to d84c896 Compare October 12, 2021 06:21
@ono-max
ono-max force-pushed the add-chrome-debugging-support branch from d84c896 to f52664a Compare October 12, 2021 09:40
@ono-max
ono-max force-pushed the add-chrome-debugging-support branch from f52664a to 624bea4 Compare October 13, 2021 23:04
@ono-max
ono-max force-pushed the add-chrome-debugging-support branch from 42e487a to 78616ba Compare October 14, 2021 00:54
@ono-max
ono-max force-pushed the add-chrome-debugging-support branch from baf49ac to d1f35c4 Compare October 14, 2021 01:12
@ko1
ko1 merged commit 927f17a into ruby:master Oct 14, 2021
@ono-max
ono-max deleted the add-chrome-debugging-support branch October 14, 2021 05:16
@ono-max

ono-max commented Oct 14, 2021

Copy link
Copy Markdown
Member Author

Thanks, I'll refactor the WebSocket logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants