YOUDEBUGScriptable Java Debugger    Wolfgang Schell    blog.jetztgrad.nettwitter.com/jetztgradnet
YOUDEBUG        Scriptable Java DebuggerDeveloped by Kohsuke Kawaguchi  (creator of Hudson/Jenkins)
WHATS INSIDE        JDI*     YouDebug  your debug script                 * Java Debug Interface
USE CASE
DEBUGGINGIDE               Applicationsource code        datadocumentation      usersnetwork access     configuration
PRODUCTION?
PRODUCTIONIDE               no installation possible source code      source confidential documentation    docs confidential...
SOLUTIONBring your debug script to the         application
PRODUCTIONYouDebug         Applicationdebug script      data                  users                  configuration
BASIC RECIPE 1. Run application in debug mode      2. Create debug script     3. Run debug script using> java -jar youdebu...
FEATURES       define breakpoints  evaluate arbitrary expressionsList threads, inspect stack frames   access/modify local v...
BREAKPOINTS     Break when reaching a specific line    Break when an exception is thrownBreak when a field is referenced or ...
EXAMPLES (1)                  Line breakpointvm.breakpoint("net.jetztgrad.buggyweb.MyServlet",35) {  println "at buggy pos...
EXAMPLES (1I)              access/modify valuevm.breakpoint("net.jetztgrad.buggyweb.MyServlet",35) {  println "age=" + age...
EXAMPLES (I1I)        get thread dump and VM infovm.suspend()println vm.virtualMachine.name()println vm.virtualMachine.des...
DEMO TIME
YOUDEBUG   Thank you! Questions?
LINKS Userguide http://youdebug.kenai.com/user-guide.htmlIntroduction http://youdebug.kenai.com/         http://docs.oracl...
Upcoming SlideShare
Loading in …5
×

Introduction to YouDebug - Scriptable Java Debugger

3,412 views

Published on

YouDebug is a Java Debugger scriptable with Groovy scripts

Published in: Technology, Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,412
On SlideShare
0
From Embeds
0
Number of Embeds
1,639
Actions
Shares
0
Downloads
13
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Introduction to YouDebug - Scriptable Java Debugger

  1. 1. YOUDEBUGScriptable Java Debugger Wolfgang Schell blog.jetztgrad.nettwitter.com/jetztgradnet
  2. 2. YOUDEBUG Scriptable Java DebuggerDeveloped by Kohsuke Kawaguchi (creator of Hudson/Jenkins)
  3. 3. WHATS INSIDE JDI* YouDebug your debug script * Java Debug Interface
  4. 4. USE CASE
  5. 5. DEBUGGINGIDE Applicationsource code datadocumentation usersnetwork access configuration
  6. 6. PRODUCTION?
  7. 7. PRODUCTIONIDE no installation possible source code source confidential documentation docs confidential network access firewall, NAT, proxiesApplication data compliance users privacy configuration security
  8. 8. SOLUTIONBring your debug script to the application
  9. 9. PRODUCTIONYouDebug Applicationdebug script data users configuration
  10. 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. 11. FEATURES define breakpoints evaluate arbitrary expressionsList threads, inspect stack frames access/modify local variables obtain stack trace obtain heap dump
  12. 12. BREAKPOINTS Break when reaching a specific line Break when an exception is thrownBreak 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/exitedBreak when a monitor is waited/contended
  13. 13. EXAMPLES (1) Line breakpointvm.breakpoint("net.jetztgrad.buggyweb.MyServlet",35) { println "at buggy position in MyServlet, line 35"}
  14. 14. EXAMPLES (1I) access/modify valuevm.breakpoint("net.jetztgrad.buggyweb.MyServlet",35) { println "age=" + age String ageParam = request.getParameter("age") println "setting age to $ageParam" age = ageParam}
  15. 15. EXAMPLES (I1I) get thread dump and VM infovm.suspend()println vm.virtualMachine.name()println vm.virtualMachine.description()vm.threads*.dumpThread()vm.resume()vm.close()
  16. 16. DEMO TIME
  17. 17. YOUDEBUG Thank you! Questions?
  18. 18. LINKS Userguide http://youdebug.kenai.com/user-guide.htmlIntroduction 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

×