SlideShare a Scribd company logo
YOUDEBUG
Scriptable Java Debugger

    Wolfgang Schell
    blog.jetztgrad.net
twitter.com/jetztgradnet
YOUDEBUG
        Scriptable Java Debugger

Developed by Kohsuke Kawaguchi
  (creator of Hudson/Jenkins)
WHAT'S INSIDE
        JDI*
     YouDebug




  your debug script


                 * Java Debug Interface
USE CASE
DEBUGGING


IDE               Application
source code        data
documentation      users
network access     configuration
PRODUCTION?
PRODUCTION
IDE               no installation possible
 source code      source confidential
 documentation    docs confidential
 network access   firewall, NAT, proxies
Application
 data             compliance
 users            privacy
 configuration     security
SOLUTION


Bring your debug script to the
         application
PRODUCTION


YouDebug         Application
debug script      data
                  users
                  configuration
BASIC RECIPE
 1. Run application in debug mode

      2. Create debug script

     3. Run debug script using
> java -jar youdebug.jar -socket
       5005 yourscript.ydb
FEATURES
       define breakpoints
  evaluate arbitrary expressions
List threads, inspect stack frames
   access/modify local variables
        obtain stack trace
        obtain heap dump
BREAKPOINTS
     Break when reaching a specific line
    Break when an exception is thrown
Break when a field is referenced or updated
   Break when a class is loaded/unloaded
 Break when a thread is created/destroyed
  Break when a method is entered/exited
Break when a monitor is waited/contended
EXAMPLES (1)
                  Line breakpoint
vm.breakpoint("net.jetztgrad.buggyweb.MyServlet",35) {
  println "at buggy position in MyServlet, line 35"
}
EXAMPLES (1I)
              access/modify value
vm.breakpoint("net.jetztgrad.buggyweb.MyServlet",35) {
  println "age=" + age
  String ageParam = request.getParameter("age")
  println "setting age to $ageParam"
  age = ageParam
}
EXAMPLES (I1I)
        get thread dump and VM info
vm.suspend()
println vm.virtualMachine.name()
println vm.virtualMachine.description()
vm.threads*.dumpThread()
vm.resume()
vm.close()
DEMO TIME
YOUDEBUG
   Thank you!

 Questions?
LINKS
 Userguide http://youdebug.kenai.com/user-guide.html

Introduction http://youdebug.kenai.com/
         http://docs.oracle.com/javase/6/docs/jdk/api/jpda/jdi/
    JDI
         index.html
         http://repo1.maven.org/maven2/org/kohsuke/
Download
         youdebug/1.3/
  Source https://github.com/kohsuke/youdebug
   Code
 Example https://github.com/jetztgradnet/2012-04-youdebug
   Code

More Related Content

What's hot (8)

PPTX
Groovy on Grails by Ziya Askerov
Vuqar Suleymanov
 
DOCX
Spring competitive tests
SkillPracticalEdTech
 
PPTX
Intro to Angular.js & Zend2 for Front-End Web Applications
TECKpert, Hubdin
 
PPTX
Lecture java basics
eleksdev
 
PPTX
Javascript Security - Three main methods of defending your MEAN stack
Ran Bar-Zik
 
PDF
Augmented reality in your web proxy
Roberto Suggi Liverani
 
PDF
Why gradle
Sercan Karaoglu
 
PPTX
Intro to JavaScript Tooling in Visual Studio Code
ColdFusionConference
 
Groovy on Grails by Ziya Askerov
Vuqar Suleymanov
 
Spring competitive tests
SkillPracticalEdTech
 
Intro to Angular.js & Zend2 for Front-End Web Applications
TECKpert, Hubdin
 
Lecture java basics
eleksdev
 
Javascript Security - Three main methods of defending your MEAN stack
Ran Bar-Zik
 
Augmented reality in your web proxy
Roberto Suggi Liverani
 
Why gradle
Sercan Karaoglu
 
Intro to JavaScript Tooling in Visual Studio Code
ColdFusionConference
 

Similar to Introduction to YouDebug - Scriptable Java Debugger (20)

PPTX
Introduction to java by priti sajja
Priti Srinivas Sajja
 
PPT
myslide6
Sandeep Putrevu
 
PPT
myslide1
Sandeep Putrevu
 
PPT
NewSeriesSlideShare
Sandeep Putrevu
 
PDF
Dynamic Languages in Production: Progress and Open Challenges
bcantrill
 
ODP
Open Source And Java
wiradikusuma
 
PPT
A begineers guide of JAVA - Getting Started
Rakesh Madugula
 
PDF
Java basics notes
poonguzhali1826
 
PPT
6) debugging and testing
techbed
 
PPTX
Interactive debugging system
Florence priyadarshini
 
KEY
Intro to java
chrisramey
 
PDF
Java: Rumours of my demise are greatly exaggerated
Steve Dalton
 
PPT
JavaClassPresentation
juliasceasor
 
PPT
1 introduction to java technology
rendezvous07
 
PDF
Beyond JVM - YOW Melbourne 2013
Charles Nutter
 
PDF
Basics of java
onewomanmore witl
 
PPTX
Introduction to Java.pptx sjskmdkdmdkdmdkdkd
giresumit9
 
DOCX
JAVA First Day
Sher Singh Bardhan
 
PPT
Introduction to Software Development
Zeeshan MIrza
 
PPTX
basic core java up to operator
kamal kotecha
 
Introduction to java by priti sajja
Priti Srinivas Sajja
 
myslide6
Sandeep Putrevu
 
myslide1
Sandeep Putrevu
 
NewSeriesSlideShare
Sandeep Putrevu
 
Dynamic Languages in Production: Progress and Open Challenges
bcantrill
 
Open Source And Java
wiradikusuma
 
A begineers guide of JAVA - Getting Started
Rakesh Madugula
 
Java basics notes
poonguzhali1826
 
6) debugging and testing
techbed
 
Interactive debugging system
Florence priyadarshini
 
Intro to java
chrisramey
 
Java: Rumours of my demise are greatly exaggerated
Steve Dalton
 
JavaClassPresentation
juliasceasor
 
1 introduction to java technology
rendezvous07
 
Beyond JVM - YOW Melbourne 2013
Charles Nutter
 
Basics of java
onewomanmore witl
 
Introduction to Java.pptx sjskmdkdmdkdmdkdkd
giresumit9
 
JAVA First Day
Sher Singh Bardhan
 
Introduction to Software Development
Zeeshan MIrza
 
basic core java up to operator
kamal kotecha
 
Ad

Recently uploaded (20)

PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
Digital Circuits, important subject in CS
contactparinay1
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Ad

Introduction to YouDebug - Scriptable Java Debugger

  • 1. YOUDEBUG Scriptable Java Debugger Wolfgang Schell blog.jetztgrad.net twitter.com/jetztgradnet
  • 2. YOUDEBUG Scriptable Java Debugger Developed by Kohsuke Kawaguchi (creator of Hudson/Jenkins)
  • 3. WHAT'S INSIDE JDI* YouDebug your debug script * Java Debug Interface
  • 5. DEBUGGING IDE Application source code data documentation users network access configuration
  • 7. PRODUCTION IDE no installation possible source code source confidential documentation docs confidential network access firewall, NAT, proxies Application data compliance users privacy configuration security
  • 8. SOLUTION Bring your debug script to the application
  • 9. PRODUCTION YouDebug Application debug script data users configuration
  • 10. BASIC RECIPE 1. Run application in debug mode 2. Create debug script 3. Run debug script using > java -jar youdebug.jar -socket 5005 yourscript.ydb
  • 11. FEATURES define breakpoints evaluate arbitrary expressions List threads, inspect stack frames access/modify local variables obtain stack trace obtain heap dump
  • 12. BREAKPOINTS Break when reaching a specific line Break when an exception is thrown Break when a field is referenced or updated Break when a class is loaded/unloaded Break when a thread is created/destroyed Break when a method is entered/exited Break when a monitor is waited/contended
  • 13. EXAMPLES (1) Line breakpoint vm.breakpoint("net.jetztgrad.buggyweb.MyServlet",35) { println "at buggy position in MyServlet, line 35" }
  • 14. EXAMPLES (1I) access/modify value vm.breakpoint("net.jetztgrad.buggyweb.MyServlet",35) { println "age=" + age String ageParam = request.getParameter("age") println "setting age to $ageParam" age = ageParam }
  • 15. EXAMPLES (I1I) get thread dump and VM info vm.suspend() println vm.virtualMachine.name() println vm.virtualMachine.description() vm.threads*.dumpThread() vm.resume() vm.close()
  • 17. YOUDEBUG Thank you! Questions?
  • 18. LINKS Userguide http://youdebug.kenai.com/user-guide.html Introduction http://youdebug.kenai.com/ http://docs.oracle.com/javase/6/docs/jdk/api/jpda/jdi/ JDI index.html http://repo1.maven.org/maven2/org/kohsuke/ Download youdebug/1.3/ Source https://github.com/kohsuke/youdebug Code Example https://github.com/jetztgradnet/2012-04-youdebug Code