Enviar búsqueda
Cargar
Defly
•
Descargar como KEY, PDF
•
0 recomendaciones
•
854 vistas
Andrew Liu
Seguir
Debugging and tracing tool for Ruby
Leer menos
Leer más
Educación
Tecnología
Salud y medicina
Denunciar
Compartir
Denunciar
Compartir
1 de 13
Descargar ahora
Recomendados
Refactorización de aplicaciones PHP/Symfony2
Refactorización de aplicaciones PHP/Symfony2
Raul Fraile
Using Sinatra to Build REST APIs in Ruby
Using Sinatra to Build REST APIs in Ruby
LaunchAny
Lightweight Webservices with Sinatra and RestClient
Lightweight Webservices with Sinatra and RestClient
Adam Wiggins
And the Greatest of These Is ... Rack Support
And the Greatest of These Is ... Rack Support
Ben Scofield
With a Mighty Hammer
With a Mighty Hammer
Ben Scofield
Building Cloud Castles
Building Cloud Castles
Ben Scofield
優しいWAFの作り方
優しいWAFの作り方
techmemo
Sinatra Rack And Middleware
Sinatra Rack And Middleware
Ben Schwarz
Recomendados
Refactorización de aplicaciones PHP/Symfony2
Refactorización de aplicaciones PHP/Symfony2
Raul Fraile
Using Sinatra to Build REST APIs in Ruby
Using Sinatra to Build REST APIs in Ruby
LaunchAny
Lightweight Webservices with Sinatra and RestClient
Lightweight Webservices with Sinatra and RestClient
Adam Wiggins
And the Greatest of These Is ... Rack Support
And the Greatest of These Is ... Rack Support
Ben Scofield
With a Mighty Hammer
With a Mighty Hammer
Ben Scofield
Building Cloud Castles
Building Cloud Castles
Ben Scofield
優しいWAFの作り方
優しいWAFの作り方
techmemo
Sinatra Rack And Middleware
Sinatra Rack And Middleware
Ben Schwarz
How to develop modern web application framework
How to develop modern web application framework
techmemo
Oro meetup #4
Oro meetup #4
Oleg Zinchenko
Great Developers Steal
Great Developers Steal
Ben Scofield
Building Cloud Castles - LRUG
Building Cloud Castles - LRUG
Ben Scofield
Keep It Simple Security (Symfony cafe 28-01-2016)
Keep It Simple Security (Symfony cafe 28-01-2016)
Oleg Zinchenko
10 Catalyst Tips
10 Catalyst Tips
Jay Shirley
Bee Smalltalk RunTime: anchor's aweigh
Bee Smalltalk RunTime: anchor's aweigh
ESUG
Psgi Plack Sfpm
Psgi Plack Sfpm
som_nangia
Quality Use Of Plugin
Quality Use Of Plugin
Yasuo Harada
RSpec 2 Best practices
RSpec 2 Best practices
Andrea Reginato
Zen: Building Maintainable Catalyst Applications
Zen: Building Maintainable Catalyst Applications
Jay Shirley
Mojolicious - A new hope
Mojolicious - A new hope
Marcus Ramberg
PhpSpec extension points
PhpSpec extension points
Norbert Orzechowicz
A Self Replicating Serverless Function
A Self Replicating Serverless Function
Michael Adda
Developing apps using Perl
Developing apps using Perl
Anatoly Sharifulin
Introduction To Moco
Introduction To Moco
Naoya Ito
Cucumber testing
Cucumber testing
Yogesh Waghmare
ISUCONアプリを Pythonで書いてみた
ISUCONアプリを Pythonで書いてみた
memememomo
Sinatra for REST services
Sinatra for REST services
Emanuele DelBono
Version control system
Version control system
Andrew Liu
A brief introduction to version control systems
A brief introduction to version control systems
Tim Staley
What is version control software and why do you need it?
What is version control software and why do you need it?
Leonid Mamchenkov
Más contenido relacionado
La actualidad más candente
How to develop modern web application framework
How to develop modern web application framework
techmemo
Oro meetup #4
Oro meetup #4
Oleg Zinchenko
Great Developers Steal
Great Developers Steal
Ben Scofield
Building Cloud Castles - LRUG
Building Cloud Castles - LRUG
Ben Scofield
Keep It Simple Security (Symfony cafe 28-01-2016)
Keep It Simple Security (Symfony cafe 28-01-2016)
Oleg Zinchenko
10 Catalyst Tips
10 Catalyst Tips
Jay Shirley
Bee Smalltalk RunTime: anchor's aweigh
Bee Smalltalk RunTime: anchor's aweigh
ESUG
Psgi Plack Sfpm
Psgi Plack Sfpm
som_nangia
Quality Use Of Plugin
Quality Use Of Plugin
Yasuo Harada
RSpec 2 Best practices
RSpec 2 Best practices
Andrea Reginato
Zen: Building Maintainable Catalyst Applications
Zen: Building Maintainable Catalyst Applications
Jay Shirley
Mojolicious - A new hope
Mojolicious - A new hope
Marcus Ramberg
PhpSpec extension points
PhpSpec extension points
Norbert Orzechowicz
A Self Replicating Serverless Function
A Self Replicating Serverless Function
Michael Adda
Developing apps using Perl
Developing apps using Perl
Anatoly Sharifulin
Introduction To Moco
Introduction To Moco
Naoya Ito
Cucumber testing
Cucumber testing
Yogesh Waghmare
ISUCONアプリを Pythonで書いてみた
ISUCONアプリを Pythonで書いてみた
memememomo
Sinatra for REST services
Sinatra for REST services
Emanuele DelBono
La actualidad más candente
(19)
How to develop modern web application framework
How to develop modern web application framework
Oro meetup #4
Oro meetup #4
Great Developers Steal
Great Developers Steal
Building Cloud Castles - LRUG
Building Cloud Castles - LRUG
Keep It Simple Security (Symfony cafe 28-01-2016)
Keep It Simple Security (Symfony cafe 28-01-2016)
10 Catalyst Tips
10 Catalyst Tips
Bee Smalltalk RunTime: anchor's aweigh
Bee Smalltalk RunTime: anchor's aweigh
Psgi Plack Sfpm
Psgi Plack Sfpm
Quality Use Of Plugin
Quality Use Of Plugin
RSpec 2 Best practices
RSpec 2 Best practices
Zen: Building Maintainable Catalyst Applications
Zen: Building Maintainable Catalyst Applications
Mojolicious - A new hope
Mojolicious - A new hope
PhpSpec extension points
PhpSpec extension points
A Self Replicating Serverless Function
A Self Replicating Serverless Function
Developing apps using Perl
Developing apps using Perl
Introduction To Moco
Introduction To Moco
Cucumber testing
Cucumber testing
ISUCONアプリを Pythonで書いてみた
ISUCONアプリを Pythonで書いてみた
Sinatra for REST services
Sinatra for REST services
Destacado
Version control system
Version control system
Andrew Liu
A brief introduction to version control systems
A brief introduction to version control systems
Tim Staley
What is version control software and why do you need it?
What is version control software and why do you need it?
Leonid Mamchenkov
Introduction to Version Control and Configuration Management
Introduction to Version Control and Configuration Management
Philip Johnson
Version control:
Version control:
RedpillLinpro
Introduction to Version Control
Introduction to Version Control
Jeremy Coates
Version Control System
Version Control System
guptaanil
Habits at Work - Merci Victoria Grace, Growth, Slack - 2016 Habit Summit
Habits at Work - Merci Victoria Grace, Growth, Slack - 2016 Habit Summit
Habit Summit
Destacado
(8)
Version control system
Version control system
A brief introduction to version control systems
A brief introduction to version control systems
What is version control software and why do you need it?
What is version control software and why do you need it?
Introduction to Version Control and Configuration Management
Introduction to Version Control and Configuration Management
Version control:
Version control:
Introduction to Version Control
Introduction to Version Control
Version Control System
Version Control System
Habits at Work - Merci Victoria Grace, Growth, Slack - 2016 Habit Summit
Habits at Work - Merci Victoria Grace, Growth, Slack - 2016 Habit Summit
Similar a Defly
Aprendendo solid com exemplos
Aprendendo solid com exemplos
vinibaggio
Hiveminder - Everything but the Secret Sauce
Hiveminder - Everything but the Secret Sauce
Jesse Vincent
There and Back Again
There and Back Again
Joshua Ballanco
GCRC 2014 - The Dark Side of Ruby
GCRC 2014 - The Dark Side of Ruby
Gautam Rege
Building Web-API without Rails, Registration or SMS
Building Web-API without Rails, Registration or SMS
Pivorak MeetUp
Beijing Perl Workshop 2008 Hiveminder Secret Sauce
Beijing Perl Workshop 2008 Hiveminder Secret Sauce
Jesse Vincent
Beware: Sharp Tools
Beware: Sharp Tools
chrismdp
Ruby Kaigi 2008 LT
Ruby Kaigi 2008 LT
Motohiro Takayama
Making and Breaking Web Services with Ruby
Making and Breaking Web Services with Ruby
err
Monkeybars in the Manor
Monkeybars in the Manor
martinbtt
Tips and tricks for building api heavy ruby on rails applications
Tips and tricks for building api heavy ruby on rails applications
Tim Cull
Effectively Testing Services - Burlington Ruby Conf
Effectively Testing Services - Burlington Ruby Conf
neal_kemp
Rails console
Rails console
Reuven Lerner
Mp24: The Bachelor, a facebook game
Mp24: The Bachelor, a facebook game
Montreal Python
Becoming a better WordPress Developer
Becoming a better WordPress Developer
Joey Kudish
Rails Presentation (Anton Dmitriyev)
Rails Presentation (Anton Dmitriyev)
True-Vision
Reasons To Love Ruby
Reasons To Love Ruby
Ben Scheirman
Beware sharp tools
Beware sharp tools
AgileOnTheBeach
CoffeeScript, An Introduction for Nodejs developers
CoffeeScript, An Introduction for Nodejs developers
Mehdi Valikhani
Ruxmon cve 2012-2661
Ruxmon cve 2012-2661
snyff
Similar a Defly
(20)
Aprendendo solid com exemplos
Aprendendo solid com exemplos
Hiveminder - Everything but the Secret Sauce
Hiveminder - Everything but the Secret Sauce
There and Back Again
There and Back Again
GCRC 2014 - The Dark Side of Ruby
GCRC 2014 - The Dark Side of Ruby
Building Web-API without Rails, Registration or SMS
Building Web-API without Rails, Registration or SMS
Beijing Perl Workshop 2008 Hiveminder Secret Sauce
Beijing Perl Workshop 2008 Hiveminder Secret Sauce
Beware: Sharp Tools
Beware: Sharp Tools
Ruby Kaigi 2008 LT
Ruby Kaigi 2008 LT
Making and Breaking Web Services with Ruby
Making and Breaking Web Services with Ruby
Monkeybars in the Manor
Monkeybars in the Manor
Tips and tricks for building api heavy ruby on rails applications
Tips and tricks for building api heavy ruby on rails applications
Effectively Testing Services - Burlington Ruby Conf
Effectively Testing Services - Burlington Ruby Conf
Rails console
Rails console
Mp24: The Bachelor, a facebook game
Mp24: The Bachelor, a facebook game
Becoming a better WordPress Developer
Becoming a better WordPress Developer
Rails Presentation (Anton Dmitriyev)
Rails Presentation (Anton Dmitriyev)
Reasons To Love Ruby
Reasons To Love Ruby
Beware sharp tools
Beware sharp tools
CoffeeScript, An Introduction for Nodejs developers
CoffeeScript, An Introduction for Nodejs developers
Ruxmon cve 2012-2661
Ruxmon cve 2012-2661
Último
The Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World Politics
Rommel Regala
Transaction Management in Database Management System
Transaction Management in Database Management System
Christalin Nelson
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
Seán Kennedy
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
mary850239
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
MIPLM
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
Conquiztadors- the Quiz Society of Sri Venkateswara College
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
JOYLYNSAMANIEGO
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
Postal Advocate Inc.
TEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docx
ruthvilladarez
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
Excellence Foundation for South Sudan
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
JojoEDelaCruz
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
Celine George
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.ppt
shraddhaparab530
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
JoshuaGantuangco2
EMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docx
Elton John Embodo
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Jemuel Francisco
Millenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptx
JanEmmanBrigoli
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
Celine George
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
Conquiztadors- the Quiz Society of Sri Venkateswara College
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
Vanessa Camilleri
Último
(20)
The Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World Politics
Transaction Management in Database Management System
Transaction Management in Database Management System
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
TEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.ppt
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
EMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docx
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Millenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptx
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
Defly
1.
Defly Debugging and Tracing
Tool for Ruby http://github.com/eggegg/defly
2.
Andrew Liu • Collage
Student • Intern @ Cardinalblue • eggegg @ github • Ruby, iOS, Android • andrewliu33@gmail.com
3.
gem install defly
4.
Defly is for... •
Trace method calls • Trace instance variables • Better error messages • Inspect the point of error
5.
class Warrior
attr_accessor :hp, :mp def sleep self.hp += 10 self.mp += 2 end end
6.
class Warrior
attr_accessor :hp, :mp def sleep puts "BEFORE: #{@hp}, #{@mp}" self.hp += 10 puts "AFTER ADDING HP: #{@hp}, #{@mp}" self.mp += 2 puts "AFTER ADDING MP: #{@hp}, #{@mp}" end end
7.
class Warrior
attr_accessor :hp, :mp def sleep self.hp += 10 self.mp += 2 end end require 'defly' Warrior.debug! Warrior.new.trace([:hp, :hp=, :mp, :mp=, :sleep], [:@hp, :@mp]) do |warrior| warrior.hp = 10 warrior.mp = 20 warrior.sleep end
8.
Tracing hp, hp=,
mp, mp=, sleep on Warrior instance Tracing @hp, @mp on Warrior instance <<<<< Warrior#hp=(10) # (irb):14:in `block in irb_binding' @hp = 10 # undefined @mp = nil # undefined >>>>> 10 <<<<< Warrior#mp=(20) # (irb):15:in `block in irb_binding' @mp = 20 # undefined >>>>> 20 <<<<< Warrior#sleep() # (irb):16:in `block in irb_binding' <<<<< Warrior#hp() # (irb):7:in `sleep' >>>>> 10 <<<<< Warrior#hp=(20) # (irb):7:in `sleep' @hp = 20 # 10 -> 20 >>>>> 20 <<<<< Warrior#mp() # (irb):8:in `sleep' >>>>> 20 <<<<< Warrior#mp=(22) # (irb):8:in `sleep' @mp = 22 # 20 -> 22 >>>>> 22 >>>>> 22
9.
NoMethodError
bug.rb debugging = nil debugging.is_annoying irb irb(main):001:0> require 'bug' NoMethodError: undefined method `is_annoying' for nil:NilClass from /Users/eggegg/bug.rb:2:in `<top (required)>' ... Where is the bug???
10.
irb(main):003:0> require 'defly' =>
true irb(main):004:0> require 'bug' NoMethodError: undefined method `is_annoying' for nil:NilClass bug.rb:2> debugging.<<is_annoying>> from /Users/andrewliu/bug.rb:2:in `<top (required)>'
11.
Inspecting Errors class Rocket
def launch! @reason = "Bugs invasion" raise "Engine Fail" end end Rocket.debug! rocket = Rocket.new rocket.watch_error "Engine Fail" rocket.launch!
12.
Ruby shell (Rib
by godfat) to inspect errors! >>>>> Error received: "Engine Fail" >>>>> #<Rocket:0(0)>> @reason => "Bugs invasion" #<Rocket:0(0)>>
13.
Thanks! Any Question?
Notas del editor
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
Descargar ahora