Presentation is loading. Please wait.

Presentation is loading. Please wait.

DEV-13: You've Got a Problem, Here’s How to Find It

Similar presentations


Presentation on theme: "DEV-13: You've Got a Problem, Here’s How to Find It"— Presentation transcript:

1 DEV-13: You've Got a Problem, Here’s How to Find It
Problem diagnosis & debugging “how to fix other people’s code” Who’s using debugger in oea? 10-1c? Wanting to go to 10.2a? Whenever I say AVM or PVM or session I mean “OpenEdge Runtime” Peter Judge Principal Software Engineer OpenEdge

2 Agenda Introduction Debugging tools Debugging situations

3 What are we trying to find and fix?
Bugs Incomplete features Resource issues Memory leaks Performance issues Queries, especially dynamic Focus of this presentation is not performance – there’s another one just for that – but there are definitely some things we can look at with the debugger that will help us with performance issues.

4 Agenda Introduction Debugging tools Debugging scenarios

5 Debugging tools OpenEdge® Debugger MESSAGE statement Logging framework
LogRead utility Pro*Spy Plus Profiler OE Architect Debugger perspective Also other 3rd party and misc tools Our main focus is on the Debugger, specifically the OEA debugger perspective.

6 OpenEdge Debuggers Java™ based Variants Local & remote debugging
Runs on Linux, Unix … Windows too Variants GUI Debugger (runs on all platforms) OpenEdge Debugger Perspective (Windows only) Local & remote debugging Attach to OpenEdge runtime Java based: means it runs on all the platforms OE is supported on. GUI Debugger: Non-Windows-based platforms require X11 (x-windows) in order to run the debugger. Look, feel, functionality identical across platforms. The main diff is that GUI debugger can attach to running process, and can step into AppServer code, and the OEA debugger can’t. (this is in the plans for OEA debugger). Debugger had Tech Preview in 9.1D05 First official release OpenEdge® 10.0A First integrated into OpenEdge Architect in 10.1A The Windows logo is a trademark of Microsoft Corporation. The Sun logo is a registered trademark of Sun Microsystems, Inc. The Red Hat logo is a registered trademark of Red Hat, Inc. The hp logo is a registered trademark of the Hewlett-Packard Company. The AiX logo is a registered trademark of IBM Corporation. Tech Preview Official Release OpenEdge Architect Integration 9.1D05 10.0A 10.1A

7 What’s available in the debugger?
See and change variables, parameters Runtime object inspection Pseudo-objects too Stack trace Break points Line Error Watchpoint Expression watches Error, watchpoint breakpoints in GUI Debugger only.

8 The OpenEdge Debugger Perspective
Leverages Eclipse Debug Framework Allows non-modal debugging Multiple concurrent debug sessions Persists breakpoints and settings Invoke using launch configs Needs r-code, but … Compiler debug listings not required Can add missing source code Simplified inspection of complex objects R-code requirement is on roadmap for removal (no dates yet) “Add Missing source code” = if source not found in propath or project, can add via UI in IDE version “non-modal” = Use editor actions during debugging “Multiple concurrent debug sessions” -> Separate PVM spawned per session “Simplified inspection of complex objects” = more and better coming in 10.2A. Only bugfixes for debugger in 10.1C. Uses adecomm/_runcode.p which does some cleanup after itself.

9 The GUI Debugger Launch it Invoke it Step into AppServer code
AppBuilder, Procedure Editor, TTY editor Compile → Debug Attach AppServer™ code from client Invoke it DEBUGGER system handle Initiate debugging in AppServer or WebSpeed® code -debugalert + MESSAGE statement Step into AppServer code Also can attach to other PVMs, on same machine or different machine. DEFINE VARIABLE debug AS LOGICAL. debug = DEBUGGER:INITIATE(). debug = DEBUGGER:SET-BREAK(“dOrder.p",6).

10 The Attachable Debugger
No need to modify code to launch debugger Great when source code unavailable Also useful when … The server’s in another office There’s no monitor attached It’s just easier to debug from where you are Note that having no source available means that we can’t see the lines of code we’re stepping through – we can only see the stack, variables and watches. A debug listing is needed to see code as we step through it.

11 Agenda Introduction Debugging tools Debugging situations
Troubleshooting Common Situations including Memory Leaks Debugging across an AppServer Performance Issues Debugging a WebSpeed application Debugging GUI and ChUI clients

12 Under Development D I S C L A I M E R
This talk includes information about potential future products and/or product enhancements. What I am going to say reflects our current thinking, but the information contained herein is preliminary and subject to change. Any future products we ultimately deliver may be materially different from what is described here. D I S C L A I M E R

13 DEMO: Memory leaks Debugger overview Persistent procedures
Buffers, temp-tables, ProDataSets UI Widgets Queries MEMPTRs Can also use LOG-MANAGER for finding memory leaks. “> RETURN NewNodeHandle. KSV > > DELETE OBJECT NewNodeHandle. “

14 DEMO: Debugging across an AppServer
Attachable debugger Enabling debugger for attachment Different machine/same machine Can step into AppServer code from GUI Logging Log-manager Logging in launch configurations Attachable debugger Enabling debugger for attachment Different machine/same machine Can step into AppServer code from GUI Logging Log-manager Logging in launch configurations LogRead utility

15 DEMO: Debugging on different platforms
Enabling debugging GUI debugger Linux, Windows Architect debugger perspective Windows

16 DEMO: Debugging WebSpeed
Log inspection Multiple logs to inspect: WebSpeed broker & server, web server logs LogRead Messages Environment vars? (speak to Garry about this) Webspeed agent debug and appserver agent debug very similar Messages prolly best way of doing things 4gl trace logging Mostly just abl code Shasha and roy’s presentations have details of plumbing stuff Log inspection Multiple logs to inspect: WebSpeed broker & server, web server logs LogRead Messages? Environment vars?

17 DEMO: Debugging performance issues
Indexes/queries Compile xref Index-information Call / execution stack Indexes/queries Compile xref Index-information Call / execution stack Profiler Performance stuff in other presentation

18 In Summary Debuggers Other tools GUI Debugger
OpenEdge Debugger Perspective Other tools Log manager

19 For More Information, go to…
PSDN LogRead 1.0 Tool Overview (English & Spanish)   Log Read Utility Documentation OpenEdge Development: Debugging and Troubleshooting OpenEdge Deployment: Startup Command and Parameter Reference

20 Relevant Exchange Sessions
Presented at psdnlive08 OPS-6: Caring for an Ailing AppServer OPS-15: What was Happening with My Database, AppServer, Operating System. . . Yesterday, Last Month, Last Year? OPS-17: Utilizing Firewalls - In the Reign of Fire Presented at Exchange, available on PSDN

21 ? Questions

22 Thank You

23


Download ppt "DEV-13: You've Got a Problem, Here’s How to Find It"

Similar presentations


Ads by Google