SlideShare una empresa de Scribd logo
1 de 76
Descargar para leer sin conexión
Introduction of Tools for providing
rich user experience in debugger
Ruby Kaigi 2022
Naoto ONO
Naoto ONO
● Developer Productivity Group at CyberAgent, Inc.


● ruby/debug (debug.gem) contributor


○ Chrome Integration


○ Test framework


● GitHub: @ono-max
debug.gem
● Ruby standard library for debugger from 3.1


● High performance compared to existing debuggers.


● You can debug Ruby program with the following tools:


○ rdbg (CLI)


○ VS Code


○ Chrome DevTools


○ Neovim


○ …
Let’s know what part of this talk you should focus
● This talk consists of two sessions


● From now, you’ll answer some yes/no questions, then you’ll know which
part to concentrate on the session 1, or session 2
???
Do you use
debug.gem?
YES
NO
??? ??? ???
Do you use
debug.gem?
Do you use VS Code when
debugging a program?
YES
NO
YES NO
Session 2
Do you use
debug.gem?
Do you use VS Code when
debugging a program?
YES
NO
YES NO
Session 1 Session 1
Session 2
Do you use
debug.gem?
Do you use VS Code when
debugging a program?
YES
NO
YES NO
Session 1 Session 1
I’ll talk debugging Ruby
program in Chrome
DevTools for these
people!
I’ll talk debugging Ruby program in
Chrome DevTools for these
people!
Session 2
Do you use
debug.gem?
Do you use VS Code when
debugging a program?
YES
NO
YES NO
Session 1 Session 1
I’ll talk tools for
supporting VS Code
debugging!
Agenda
● Session 1: About Chrome DevTools debugging


○ This session includes basic functions in a debugger, too.


● Session 2: About tools for supporting debugging in VS Code


○ This session is about tools related to debugging, not about the
debugger itself.
Agenda
● Session 1: About Chrome DevTools debugging


○ This session includes basic functions in a debugger, too.


● Session 2: About tools for supporting debugging in VS Code


○ This session is about tools related to debugging, not about the
debugger itself.


Goal: Everyone wants to use tools in this talk!
I’m very glad if I can get
your feedbacks, too 😁
About Chrome DevTools debugging
What is Chrome DevTools?
Pause the program at line 4!
Set the breakpoint at line 4
View and Change the
DOM
Debug JavaScript
View HTTP request
and response
What is Chrome DevTools?
Pause the program at line 4!
Set the breakpoint at line 4
View and Change the
DOM
Debug JavaScript
View HTTP request
and response
Do you know how to debug JavaScript in Chrome DevTools?
Pause the program at line 4!
Do you know how to debug JavaScript in Chrome DevTools?
Do you know how to debug JavaScript in Chrome DevTools?
Do you know how to debug JavaScript in Chrome DevTools?
You can debug Ruby
program here!!
Do you know how to debug JavaScript in Chrome DevTools?
The motivation of supporting Chrome DevTools
I’d like to debug Ruby program in rich UI such as VS Code, but…
I’d like to debug Ruby program in rich UI such as VS Code, but…
● I’m non-user of VS Code
I’d like to debug Ruby program in rich UI such as VS Code, but…
● I’m non-user of VS Code


● it’s hard to install VS Code for any reason
We installed Google Chrome on your laptop, don’t we?
We installed Google Chrome on your laptop, don’t we?
● By supporting Chrome DevTools debugging, we can provide rich user
experience to non-users of VS Code!
We installed Google Chrome on your laptop, don’t we?
● By supporting Chrome DevTools debugging, we can provide rich user
experience to non-users of VS Code!


● Project Goal: Implement functions in Chrome DevTools are comparable to
those in VS Code
Demonstration: Using a debugger in Chrome DevTools
class SampleClass


def initialize arg1, arg2


@arg1 = arg1


@arg2 = arg2


end


end


def sample_method


a = 1


b = 2


c = 3


a + b + c


end


s = SampleClass.new 1, 2


sample_method()


sample_method()


sample_method()


sample_method()


sample_method()
Sample Script to
debug in the
demonstration
How do Chrome DevTools communicate


with debug.gem?
Chrome DevTools Protocol (CDP)
Client: Chrome DevTools Server: debug.gem
Chrome DevTools Protocol (CDP)
Click “Step Into”
Client: Chrome DevTools Server: debug.gem
Chrome DevTools Protocol (CDP)
Click “Step Into”
Client: Chrome DevTools Server: debug.gem
Step Into
Chrome DevTools Protocol (CDP)
Click “Step Into”
Client: Chrome DevTools Server: debug.gem
Step Into
ACK
Chrome DevTools Protocol (CDP)
Client: Chrome DevTools Server: debug.gem
Click “Step Into”
Step Into
Paused at line 5
ACK
What we can’t do in Chrome DevTools debugging
● Code completion in Chrome Console


● Supporting thread interface


● Coloring code
Summary for session 1
● You can debug Ruby program in Chrome’s rich UI easily.


○ You don’t have to install any tools except for Chrome.


● Chrome DevTools Protocol (CDP) is used between debug.gem and
Chrome DevTools.
The topic about Chrome DevTools is finished!
Session 2
Do you use
debug.gem?
Do you use VS Code when
debugging a program?
YES
NO
YES NO
Session 1 Session 1
Thank you for waiting
VS Code users!
About tools for supporting debugging in VSCode
rdbg-inspector
● Tools for supporting debugging in VS Code


● rdbg-inspector is WIP project which means it’s not released yet
Features for rdbg-inspector
● ???


● ???
Features for rdbg-inspector
● ???


● ???
I know it’s quite sudden, but…
We want to go back to some points when debugging it, don’t we?
● What was the value of variable “a” when program was paused at line
6…?
We want to go back to some points when debugging it, don’t we?
● What was the value of variable “a” when program was paused at line
6…?


● I’d like to see the procedure here again…
We want to go back to some points when debugging it, don’t we?
Demonstration: Going back to some points in debugger
class SampleClass


def initialize arg1, arg2


@arg1 = arg1


@arg2 = arg2


end


end


def sample_method


a = 1


b = 2


c = 3


a + b + c


end


s = SampleClass.new 1, 2


sample_method()


sample_method()


sample_method()


sample_method()


sample_method()
Sample Script to
debug in the
demonstration
● You can go back and forth between the program by clicking recorded
execution logs


● History Inspector is realized by Step Into and Step Back feature in
debug.gem.
History Inspector
Features for rdbg-inspector
● History Inspector


● ???
Features for rdbg-inspector
● History Inspector


● ???
Debugging rails app in VS Code
Debugging rails app in VS Code
Debugging rails app in VS Code
Using Debug Console in VS Code
Using Debug Console in VS Code
Evaluation of Active Record object
Computer class is Active
Record.
Evaluation of Active Record object
Tree View of Active Record object
Tree View of Active Record object
This is useful, but…
It’s useful if we can see Active Record object as a table, isn’t it?
Tree View of Array object
Tree View of Array object
This is also…
It’s useful if we can see Active Record object as a chart, isn’t it?
Demonstration: Visualization of objects
class ComputersController < ApplicationController


before_action :set_computer, only: %i[ show edit update
destroy ]


# GET /computers or /computers.json


def index


binding.break


@computers = Computer.limit(100)


end


# GET /computers/1 or /computers/1.json


def show


end


...
Sample rails app to
debug in the
demonstration
Demonstration Video
Object Inspector
● Object Inspector converts objects to visualized something


● Users can define how objects are visualized
Summary for session 2
● Features of rdbg inspector are as follows:


○ History Inspector


○ Object Inspector


● I’m looking forward to getting feedback from everyone!
Conclusion…
We want to use these tools, don’t we?
● Debugging in Chrome DevTools


● Tools for supporting debugging in VS Code
Next…
● Create the issue and write a blog to give us feedback!


● If you want to learn how these tools work,


○ https://chromedevtools.github.io/devtools-protocol/


○ https://microsoft.github.io/debug-adapter-protocol/


○ https://github.com/ruby/debug
● Koichi Sasada (@ko1)


○ He gave me the idea of Chrome Integration and rdbg inspector


○ If it had not been for his help, I wouldn’t have been here!


● Thank you for helping me to implement Chrome Integration


○ Andrea Cardaci (@cyrus-and)


■ Author of chrome remote-interface


○ Geoffrey Litt (@geoffreylitt)


■ Author of ladybug


● Thanks to the following organization, I can continue developing debugging tools


○ Ruby Association


○ Google Summer of Code
Acknowledgement
● Thank you for reviewing my presentation


○ Yusuke Endo (@mame)


○ Yuta Saito (@kateinoigakukun)


○ Daichi Furiya (@wasabeef)


○ Yoshiki Fujikane (@fujiwo)


○ Yuki Shigemasa (@gegeson)
Acknowledgement2

Más contenido relacionado

La actualidad más candente

C++でできる!OS自作入門
C++でできる!OS自作入門C++でできる!OS自作入門
C++でできる!OS自作入門uchan_nos
 
はじめての datadog
はじめての datadogはじめての datadog
はじめての datadogNaoya Nakazawa
 
マイクロサービスバックエンドAPIのためのRESTとgRPC
マイクロサービスバックエンドAPIのためのRESTとgRPCマイクロサービスバックエンドAPIのためのRESTとgRPC
マイクロサービスバックエンドAPIのためのRESTとgRPCdisc99_
 
Mercari JPのモノリスサービスをKubernetesに移行した話 PHP Conference 2022 9/24
Mercari JPのモノリスサービスをKubernetesに移行した話 PHP Conference 2022 9/24Mercari JPのモノリスサービスをKubernetesに移行した話 PHP Conference 2022 9/24
Mercari JPのモノリスサービスをKubernetesに移行した話 PHP Conference 2022 9/24Shin Ohno
 
暗号技術の実装と数学
暗号技術の実装と数学暗号技術の実装と数学
暗号技術の実装と数学MITSUNARI Shigeo
 
backlogsでもCI/CDする夢を見る
backlogsでもCI/CDする夢を見るbacklogsでもCI/CDする夢を見る
backlogsでもCI/CDする夢を見るTakeru Maehara
 
冬のLock free祭り safe
冬のLock free祭り safe冬のLock free祭り safe
冬のLock free祭り safeKumazaki Hiroki
 
エンジニアの個人ブランディングと技術組織
エンジニアの個人ブランディングと技術組織エンジニアの個人ブランディングと技術組織
エンジニアの個人ブランディングと技術組織Takafumi ONAKA
 
【とらのあなラボ Tech Day #3】新規システムにおける技術選定〜GoとgRPCを採用した話〜
【とらのあなラボ Tech Day #3】新規システムにおける技術選定〜GoとgRPCを採用した話〜	【とらのあなラボ Tech Day #3】新規システムにおける技術選定〜GoとgRPCを採用した話〜
【とらのあなラボ Tech Day #3】新規システムにおける技術選定〜GoとgRPCを採用した話〜 虎の穴 開発室
 
Osc2015北海道 札幌my sql勉強会_波多野_r3
Osc2015北海道 札幌my sql勉強会_波多野_r3Osc2015北海道 札幌my sql勉強会_波多野_r3
Osc2015北海道 札幌my sql勉強会_波多野_r3Nobuhiro Hatano
 
雑なMySQLパフォーマンスチューニング
雑なMySQLパフォーマンスチューニング雑なMySQLパフォーマンスチューニング
雑なMySQLパフォーマンスチューニングyoku0825
 
このPHP QAツールがすごい!2019
このPHP QAツールがすごい!2019 このPHP QAツールがすごい!2019
このPHP QAツールがすごい!2019 sasezaki
 
SQL大量発行処理をいかにして高速化するか
SQL大量発行処理をいかにして高速化するかSQL大量発行処理をいかにして高速化するか
SQL大量発行処理をいかにして高速化するかShogo Wakayama
 
5.6 以前の InnoDB Flushing
5.6 以前の InnoDB Flushing5.6 以前の InnoDB Flushing
5.6 以前の InnoDB FlushingTakanori Sejima
 
そうだったのか! よくわかる process.nextTick() node.jsのイベントループを理解する
そうだったのか! よくわかる process.nextTick() node.jsのイベントループを理解するそうだったのか! よくわかる process.nextTick() node.jsのイベントループを理解する
そうだったのか! よくわかる process.nextTick() node.jsのイベントループを理解するshigeki_ohtsu
 
eStargzイメージとlazy pullingによる高速なコンテナ起動
eStargzイメージとlazy pullingによる高速なコンテナ起動eStargzイメージとlazy pullingによる高速なコンテナ起動
eStargzイメージとlazy pullingによる高速なコンテナ起動Kohei Tokunaga
 

La actualidad más candente (20)

C++でできる!OS自作入門
C++でできる!OS自作入門C++でできる!OS自作入門
C++でできる!OS自作入門
 
はじめての datadog
はじめての datadogはじめての datadog
はじめての datadog
 
マイクロサービスバックエンドAPIのためのRESTとgRPC
マイクロサービスバックエンドAPIのためのRESTとgRPCマイクロサービスバックエンドAPIのためのRESTとgRPC
マイクロサービスバックエンドAPIのためのRESTとgRPC
 
HashMapとは?
HashMapとは?HashMapとは?
HashMapとは?
 
Mercari JPのモノリスサービスをKubernetesに移行した話 PHP Conference 2022 9/24
Mercari JPのモノリスサービスをKubernetesに移行した話 PHP Conference 2022 9/24Mercari JPのモノリスサービスをKubernetesに移行した話 PHP Conference 2022 9/24
Mercari JPのモノリスサービスをKubernetesに移行した話 PHP Conference 2022 9/24
 
暗号技術の実装と数学
暗号技術の実装と数学暗号技術の実装と数学
暗号技術の実装と数学
 
backlogsでもCI/CDする夢を見る
backlogsでもCI/CDする夢を見るbacklogsでもCI/CDする夢を見る
backlogsでもCI/CDする夢を見る
 
冬のLock free祭り safe
冬のLock free祭り safe冬のLock free祭り safe
冬のLock free祭り safe
 
エンジニアの個人ブランディングと技術組織
エンジニアの個人ブランディングと技術組織エンジニアの個人ブランディングと技術組織
エンジニアの個人ブランディングと技術組織
 
【とらのあなラボ Tech Day #3】新規システムにおける技術選定〜GoとgRPCを採用した話〜
【とらのあなラボ Tech Day #3】新規システムにおける技術選定〜GoとgRPCを採用した話〜	【とらのあなラボ Tech Day #3】新規システムにおける技術選定〜GoとgRPCを採用した話〜
【とらのあなラボ Tech Day #3】新規システムにおける技術選定〜GoとgRPCを採用した話〜
 
Osc2015北海道 札幌my sql勉強会_波多野_r3
Osc2015北海道 札幌my sql勉強会_波多野_r3Osc2015北海道 札幌my sql勉強会_波多野_r3
Osc2015北海道 札幌my sql勉強会_波多野_r3
 
雑なMySQLパフォーマンスチューニング
雑なMySQLパフォーマンスチューニング雑なMySQLパフォーマンスチューニング
雑なMySQLパフォーマンスチューニング
 
C# 9.0 / .NET 5.0
C# 9.0 / .NET 5.0C# 9.0 / .NET 5.0
C# 9.0 / .NET 5.0
 
このPHP QAツールがすごい!2019
このPHP QAツールがすごい!2019 このPHP QAツールがすごい!2019
このPHP QAツールがすごい!2019
 
SQL大量発行処理をいかにして高速化するか
SQL大量発行処理をいかにして高速化するかSQL大量発行処理をいかにして高速化するか
SQL大量発行処理をいかにして高速化するか
 
5.6 以前の InnoDB Flushing
5.6 以前の InnoDB Flushing5.6 以前の InnoDB Flushing
5.6 以前の InnoDB Flushing
 
そうだったのか! よくわかる process.nextTick() node.jsのイベントループを理解する
そうだったのか! よくわかる process.nextTick() node.jsのイベントループを理解するそうだったのか! よくわかる process.nextTick() node.jsのイベントループを理解する
そうだったのか! よくわかる process.nextTick() node.jsのイベントループを理解する
 
eStargzイメージとlazy pullingによる高速なコンテナ起動
eStargzイメージとlazy pullingによる高速なコンテナ起動eStargzイメージとlazy pullingによる高速なコンテナ起動
eStargzイメージとlazy pullingによる高速なコンテナ起動
 
Docker Compose 徹底解説
Docker Compose 徹底解説Docker Compose 徹底解説
Docker Compose 徹底解説
 
プログラムを高速化する話
プログラムを高速化する話プログラムを高速化する話
プログラムを高速化する話
 

Similar a Introduction of Tools for providing rich user experience in debugger

Autotools, Design Patterns and more
Autotools, Design Patterns and moreAutotools, Design Patterns and more
Autotools, Design Patterns and moreVicente Bolea
 
Debugging Modern C++ Application with Gdb
Debugging Modern C++ Application with GdbDebugging Modern C++ Application with Gdb
Debugging Modern C++ Application with GdbSenthilKumar Selvaraj
 
Top Tips Every Notes Developer Needs To Know
Top Tips Every Notes Developer Needs To KnowTop Tips Every Notes Developer Needs To Know
Top Tips Every Notes Developer Needs To KnowKathy Brown
 
Working With Legacy Code
Working With Legacy CodeWorking With Legacy Code
Working With Legacy CodeAndrea Polci
 
Exploring the power of Gradle in android studio - Basics & Beyond
Exploring the power of Gradle in android studio - Basics & BeyondExploring the power of Gradle in android studio - Basics & Beyond
Exploring the power of Gradle in android studio - Basics & BeyondKaushal Dhruw
 
Python debuggers slides
Python debuggers slidesPython debuggers slides
Python debuggers slidesmattboehm
 
Practices of agile developers
Practices of agile developersPractices of agile developers
Practices of agile developersDUONG Trong Tan
 
Creating a reasonable project boilerplate
Creating a reasonable project boilerplateCreating a reasonable project boilerplate
Creating a reasonable project boilerplateStanislav Petrov
 
Indy meetup#7 effective unit-testing-mule
Indy meetup#7 effective unit-testing-muleIndy meetup#7 effective unit-testing-mule
Indy meetup#7 effective unit-testing-muleikram_ahamed
 
Top 8 Tools for Debugging React Native Applications!
Top 8 Tools for Debugging React Native Applications!					Top 8 Tools for Debugging React Native Applications!
Top 8 Tools for Debugging React Native Applications! Shelly Megan
 
Writing Tests with the Unity Test Framework
Writing Tests with the Unity Test FrameworkWriting Tests with the Unity Test Framework
Writing Tests with the Unity Test FrameworkPeter Kofler
 
BDD Testing Using Godog - Bangalore Golang Meetup # 32
BDD Testing Using Godog - Bangalore Golang Meetup # 32BDD Testing Using Godog - Bangalore Golang Meetup # 32
BDD Testing Using Godog - Bangalore Golang Meetup # 32OpenEBS
 
Bdd agile requirements
Bdd agile requirementsBdd agile requirements
Bdd agile requirementsAgile Vietnam
 
Oh the compilers you'll build
Oh the compilers you'll buildOh the compilers you'll build
Oh the compilers you'll buildMark Stoodley
 
Writing mruby Debugger
Writing mruby DebuggerWriting mruby Debugger
Writing mruby Debuggeryamanekko
 
Software Testing Basic Concepts
Software Testing Basic ConceptsSoftware Testing Basic Concepts
Software Testing Basic Conceptswesovi
 
IDE and Toolset For Magento Development
IDE and Toolset For Magento DevelopmentIDE and Toolset For Magento Development
IDE and Toolset For Magento DevelopmentAbid Malik
 

Similar a Introduction of Tools for providing rich user experience in debugger (20)

Autotools, Design Patterns and more
Autotools, Design Patterns and moreAutotools, Design Patterns and more
Autotools, Design Patterns and more
 
Debugging Modern C++ Application with Gdb
Debugging Modern C++ Application with GdbDebugging Modern C++ Application with Gdb
Debugging Modern C++ Application with Gdb
 
Top Tips Every Notes Developer Needs To Know
Top Tips Every Notes Developer Needs To KnowTop Tips Every Notes Developer Needs To Know
Top Tips Every Notes Developer Needs To Know
 
Working With Legacy Code
Working With Legacy CodeWorking With Legacy Code
Working With Legacy Code
 
Exploring the power of Gradle in android studio - Basics & Beyond
Exploring the power of Gradle in android studio - Basics & BeyondExploring the power of Gradle in android studio - Basics & Beyond
Exploring the power of Gradle in android studio - Basics & Beyond
 
Python debuggers slides
Python debuggers slidesPython debuggers slides
Python debuggers slides
 
Practices of agile developers
Practices of agile developersPractices of agile developers
Practices of agile developers
 
Creating a reasonable project boilerplate
Creating a reasonable project boilerplateCreating a reasonable project boilerplate
Creating a reasonable project boilerplate
 
Quick Intro to Clean Coding
Quick Intro to Clean CodingQuick Intro to Clean Coding
Quick Intro to Clean Coding
 
Indy meetup#7 effective unit-testing-mule
Indy meetup#7 effective unit-testing-muleIndy meetup#7 effective unit-testing-mule
Indy meetup#7 effective unit-testing-mule
 
GNU Debugger
GNU DebuggerGNU Debugger
GNU Debugger
 
Gnu debugger
Gnu debuggerGnu debugger
Gnu debugger
 
Top 8 Tools for Debugging React Native Applications!
Top 8 Tools for Debugging React Native Applications!					Top 8 Tools for Debugging React Native Applications!
Top 8 Tools for Debugging React Native Applications!
 
Writing Tests with the Unity Test Framework
Writing Tests with the Unity Test FrameworkWriting Tests with the Unity Test Framework
Writing Tests with the Unity Test Framework
 
BDD Testing Using Godog - Bangalore Golang Meetup # 32
BDD Testing Using Godog - Bangalore Golang Meetup # 32BDD Testing Using Godog - Bangalore Golang Meetup # 32
BDD Testing Using Godog - Bangalore Golang Meetup # 32
 
Bdd agile requirements
Bdd agile requirementsBdd agile requirements
Bdd agile requirements
 
Oh the compilers you'll build
Oh the compilers you'll buildOh the compilers you'll build
Oh the compilers you'll build
 
Writing mruby Debugger
Writing mruby DebuggerWriting mruby Debugger
Writing mruby Debugger
 
Software Testing Basic Concepts
Software Testing Basic ConceptsSoftware Testing Basic Concepts
Software Testing Basic Concepts
 
IDE and Toolset For Magento Development
IDE and Toolset For Magento DevelopmentIDE and Toolset For Magento Development
IDE and Toolset For Magento Development
 

Último

Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spaintimesproduction05
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Christo Ananth
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 

Último (20)

Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spain
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 

Introduction of Tools for providing rich user experience in debugger

  • 1. Introduction of Tools for providing rich user experience in debugger Ruby Kaigi 2022 Naoto ONO
  • 2. Naoto ONO ● Developer Productivity Group at CyberAgent, Inc. ● ruby/debug (debug.gem) contributor ○ Chrome Integration ○ Test framework ● GitHub: @ono-max
  • 3. debug.gem ● Ruby standard library for debugger from 3.1 ● High performance compared to existing debuggers. ● You can debug Ruby program with the following tools: ○ rdbg (CLI) ○ VS Code ○ Chrome DevTools ○ Neovim ○ …
  • 4. Let’s know what part of this talk you should focus ● This talk consists of two sessions ● From now, you’ll answer some yes/no questions, then you’ll know which part to concentrate on the session 1, or session 2
  • 6. ??? ??? ??? Do you use debug.gem? Do you use VS Code when debugging a program? YES NO YES NO
  • 7. Session 2 Do you use debug.gem? Do you use VS Code when debugging a program? YES NO YES NO Session 1 Session 1
  • 8. Session 2 Do you use debug.gem? Do you use VS Code when debugging a program? YES NO YES NO Session 1 Session 1 I’ll talk debugging Ruby program in Chrome DevTools for these people! I’ll talk debugging Ruby program in Chrome DevTools for these people!
  • 9. Session 2 Do you use debug.gem? Do you use VS Code when debugging a program? YES NO YES NO Session 1 Session 1 I’ll talk tools for supporting VS Code debugging!
  • 10. Agenda ● Session 1: About Chrome DevTools debugging ○ This session includes basic functions in a debugger, too. ● Session 2: About tools for supporting debugging in VS Code ○ This session is about tools related to debugging, not about the debugger itself.
  • 11. Agenda ● Session 1: About Chrome DevTools debugging ○ This session includes basic functions in a debugger, too. ● Session 2: About tools for supporting debugging in VS Code ○ This session is about tools related to debugging, not about the debugger itself. Goal: Everyone wants to use tools in this talk! I’m very glad if I can get your feedbacks, too 😁
  • 13. What is Chrome DevTools? Pause the program at line 4! Set the breakpoint at line 4 View and Change the DOM Debug JavaScript View HTTP request and response
  • 14. What is Chrome DevTools? Pause the program at line 4! Set the breakpoint at line 4 View and Change the DOM Debug JavaScript View HTTP request and response
  • 15. Do you know how to debug JavaScript in Chrome DevTools? Pause the program at line 4!
  • 16. Do you know how to debug JavaScript in Chrome DevTools?
  • 17. Do you know how to debug JavaScript in Chrome DevTools?
  • 18. Do you know how to debug JavaScript in Chrome DevTools?
  • 19. You can debug Ruby program here!! Do you know how to debug JavaScript in Chrome DevTools?
  • 20. The motivation of supporting Chrome DevTools
  • 21. I’d like to debug Ruby program in rich UI such as VS Code, but…
  • 22. I’d like to debug Ruby program in rich UI such as VS Code, but… ● I’m non-user of VS Code
  • 23. I’d like to debug Ruby program in rich UI such as VS Code, but… ● I’m non-user of VS Code ● it’s hard to install VS Code for any reason
  • 24. We installed Google Chrome on your laptop, don’t we?
  • 25. We installed Google Chrome on your laptop, don’t we? ● By supporting Chrome DevTools debugging, we can provide rich user experience to non-users of VS Code!
  • 26. We installed Google Chrome on your laptop, don’t we? ● By supporting Chrome DevTools debugging, we can provide rich user experience to non-users of VS Code! ● Project Goal: Implement functions in Chrome DevTools are comparable to those in VS Code
  • 27. Demonstration: Using a debugger in Chrome DevTools
  • 28. class SampleClass def initialize arg1, arg2 @arg1 = arg1 @arg2 = arg2 end end def sample_method a = 1 b = 2 c = 3 a + b + c end s = SampleClass.new 1, 2 sample_method() sample_method() sample_method() sample_method() sample_method() Sample Script to debug in the demonstration
  • 29.
  • 30. How do Chrome DevTools communicate with debug.gem?
  • 31. Chrome DevTools Protocol (CDP) Client: Chrome DevTools Server: debug.gem
  • 32. Chrome DevTools Protocol (CDP) Click “Step Into” Client: Chrome DevTools Server: debug.gem
  • 33. Chrome DevTools Protocol (CDP) Click “Step Into” Client: Chrome DevTools Server: debug.gem Step Into
  • 34. Chrome DevTools Protocol (CDP) Click “Step Into” Client: Chrome DevTools Server: debug.gem Step Into ACK
  • 35. Chrome DevTools Protocol (CDP) Client: Chrome DevTools Server: debug.gem Click “Step Into” Step Into Paused at line 5 ACK
  • 36. What we can’t do in Chrome DevTools debugging ● Code completion in Chrome Console ● Supporting thread interface ● Coloring code
  • 37. Summary for session 1 ● You can debug Ruby program in Chrome’s rich UI easily. ○ You don’t have to install any tools except for Chrome. ● Chrome DevTools Protocol (CDP) is used between debug.gem and Chrome DevTools.
  • 38. The topic about Chrome DevTools is finished!
  • 39. Session 2 Do you use debug.gem? Do you use VS Code when debugging a program? YES NO YES NO Session 1 Session 1 Thank you for waiting VS Code users!
  • 40. About tools for supporting debugging in VSCode
  • 41. rdbg-inspector ● Tools for supporting debugging in VS Code ● rdbg-inspector is WIP project which means it’s not released yet
  • 44. I know it’s quite sudden, but…
  • 45. We want to go back to some points when debugging it, don’t we?
  • 46. ● What was the value of variable “a” when program was paused at line 6…? We want to go back to some points when debugging it, don’t we?
  • 47. ● What was the value of variable “a” when program was paused at line 6…? ● I’d like to see the procedure here again… We want to go back to some points when debugging it, don’t we?
  • 48. Demonstration: Going back to some points in debugger
  • 49. class SampleClass def initialize arg1, arg2 @arg1 = arg1 @arg2 = arg2 end end def sample_method a = 1 b = 2 c = 3 a + b + c end s = SampleClass.new 1, 2 sample_method() sample_method() sample_method() sample_method() sample_method() Sample Script to debug in the demonstration
  • 50.
  • 51. ● You can go back and forth between the program by clicking recorded execution logs ● History Inspector is realized by Step Into and Step Back feature in debug.gem. History Inspector
  • 52. Features for rdbg-inspector ● History Inspector ● ???
  • 53. Features for rdbg-inspector ● History Inspector ● ???
  • 54. Debugging rails app in VS Code
  • 55. Debugging rails app in VS Code
  • 56. Debugging rails app in VS Code
  • 57. Using Debug Console in VS Code
  • 58. Using Debug Console in VS Code
  • 59. Evaluation of Active Record object Computer class is Active Record.
  • 60. Evaluation of Active Record object
  • 61. Tree View of Active Record object
  • 62. Tree View of Active Record object This is useful, but…
  • 63. It’s useful if we can see Active Record object as a table, isn’t it?
  • 64. Tree View of Array object
  • 65. Tree View of Array object This is also…
  • 66. It’s useful if we can see Active Record object as a chart, isn’t it?
  • 68. class ComputersController < ApplicationController before_action :set_computer, only: %i[ show edit update destroy ] # GET /computers or /computers.json def index binding.break @computers = Computer.limit(100) end # GET /computers/1 or /computers/1.json def show end ... Sample rails app to debug in the demonstration
  • 70. Object Inspector ● Object Inspector converts objects to visualized something ● Users can define how objects are visualized
  • 71. Summary for session 2 ● Features of rdbg inspector are as follows: ○ History Inspector ○ Object Inspector ● I’m looking forward to getting feedback from everyone!
  • 73. We want to use these tools, don’t we? ● Debugging in Chrome DevTools ● Tools for supporting debugging in VS Code
  • 74. Next… ● Create the issue and write a blog to give us feedback! ● If you want to learn how these tools work, ○ https://chromedevtools.github.io/devtools-protocol/ ○ https://microsoft.github.io/debug-adapter-protocol/ ○ https://github.com/ruby/debug
  • 75. ● Koichi Sasada (@ko1) ○ He gave me the idea of Chrome Integration and rdbg inspector ○ If it had not been for his help, I wouldn’t have been here! ● Thank you for helping me to implement Chrome Integration ○ Andrea Cardaci (@cyrus-and) ■ Author of chrome remote-interface ○ Geoffrey Litt (@geoffreylitt) ■ Author of ladybug ● Thanks to the following organization, I can continue developing debugging tools ○ Ruby Association ○ Google Summer of Code Acknowledgement
  • 76. ● Thank you for reviewing my presentation ○ Yusuke Endo (@mame) ○ Yuta Saito (@kateinoigakukun) ○ Daichi Furiya (@wasabeef) ○ Yoshiki Fujikane (@fujiwo) ○ Yuki Shigemasa (@gegeson) Acknowledgement2