• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Using Exception Breakpoints in WDSc

    April 7, 2004 Hey, David

    I have only been using WDSc (WebSphere Development Studio client) for a few weeks, so this may be an obvious question. How would you watch a variable in a Java program? Is there some way to trace a value or break when a certain condition is met? I hit F8 to run to my break point and hover the mouse over a variable to see its value. I just spent about two hours repeating this procedure to find out why my program was receiving a null pointer exception, even though I knew from the stack trace exactly what line the program was failing on.

    –Neil

    The debugger in WDSc is amazingly powerful. One useful feature that is easy to miss is the ability to set exception break points. An exception break point causes a running program to stop execution, allowing you to inspect variables and diagnose a problem. To add an exception breakpoint select Add Java Exception Breakpoint from the Run drop-down menu.

    You can also add conditional break points and watch a value. Double-click the left border area of the line where you want your breakpoint. A blue bullet will appear, indicating that a breakpoint is set for the line. After setting the breakpoint, right-click the blue bullet and select Breakpoint Properties. . . . The Java Line Breakpoint Properties dialog will appear. Check the Enable Condition checkbox and enter a condition that resolves to a true Boolean value. That condition can be as simple as myString.equals(“value”), or a complex condition. The code you enter in this box is nearly unlimited and will be aware of program variables in the executing program. I have even used this dialog to log values to the console, using System.err.println(myString).

    Figure 1

    The Java Line Breakpoint Properties dialog

    You can also use the Java line breakpoint properties dialog to set a breakpoint when a value changes, by selecting the Suspend when value of condition changes radio button.

    Please participate in our iSeries programming survey at
    http://www.surveymonkey.com/s.asp?u=74193419903

    Now that you know where to find these debug features, I bet your future debugging will go much more quickly.

    –David

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    VISUAL LANSA 16 WEBINAR

    Trying to balance stability and agility in your IBM i environment?

    Join this webinar and explore Visual LANSA 16 – our enhanced professional low-code platform designed to help organizations running on IBM i evolve seamlessly for what’s next.

    🎙️VISUAL LANSA 16 WEBINAR

    Break Monolithic IBM i Applications and Unlock New Value

    Explore modernization without rewriting. Decouple monolithic applications and extend their value through integration with modern services, web frameworks, and cloud technologies.

    🗓️ July 10, 2025

    ⏰ 9 AM – 10 AM CDT (4 PM to 5 PM CEST)

    See the webinar schedule in your time zone

    Register to join the webinar now

    What to Expect

    • Get to know Visual LANSA 16, its core features, latest enhancements, and use cases
    • Understand how you can transition to a MACH-aligned architecture to enable faster innovation
    • Discover native REST APIs, WebView2 support, cloud-ready Azure licensing, and more to help transform and scale your IBM i applications

    Read more about V16 here.

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tango/04 Launches New Message Log Monitor Will On Demand Put iSeries in Demand? Not Likely, Says Gartner

    Leave a Reply Cancel reply

Volume 4, Number 11 -- April 7, 2004
THIS ISSUE
SPONSORED BY:

Advanced Systems Concepts
Guild Companies
WorksRight Sofware
COMMON
Client Server Development

Table of Contents

  • ILE in Practice
  • Using Exception Breakpoints in WDSc
  • Using Filters in the Remote Systems LPEX Editor
  • Admin Alert: The Joys of Creating User Profile Information Files
  • OS/400 Alert: Microsoft Previews Windows XP Service Pack 2

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • Liam Allan Shares What’s Coming Next With Code For IBM i
  • From Stable To Scalable: Visual LANSA 16 Powers IBM i Growth – Launching July 8
  • VS Code Will Be The Heart Of The Modern IBM i Platform
  • The AS/400: A 37-Year-Old Dog That Loves To Learn New Tricks
  • IBM i PTF Guide, Volume 27, Number 25
  • Meet The Next Gen Of IBMers Helping To Build IBM i
  • Looks Like IBM Is Building A Linux-Like PASE For IBM i After All
  • Will Independent IBM i Clouds Survive PowerVS?
  • Now, IBM Is Jacking Up Hardware Maintenance Prices
  • IBM i PTF Guide, Volume 27, Number 24

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle