Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Some examples of some abilities that an IDE debugger will give you over trace messages in code:</p> <ul> <li>View the <strong>call stack</strong> at any point in time, giving you a context for your current stack frame.</li> <li><strong>Step into libraries</strong> that you are not able to re-compile for the purposes of adding traces (assuming you have access to the debug symbols)</li> <li><strong>Change variable values</strong> while the program is running</li> <li>Edit and continue - the ability to <strong>change code while it is running</strong> and immediately see the results of the change</li> <li>Be able to <strong>watch</strong> variables, seeing when they change</li> <li>Be able to <strong>skip or repeat sections of code</strong>, to see how the code will perform. This allows you to test out theoretical changes before making them.</li> <li>Examine <strong>memory contents</strong> in real-time</li> <li>Alert you when certain <strong>exceptions</strong> are thrown, even if they are handled by the application.</li> <li><strong>Conditional breakpointing</strong>; stopping the application only in exceptional circumstances to allow you to analyse the stack and variables.</li> <li>View the <strong>thread context</strong> in multi-threaded applications, which can be difficult to achieve with tracing (as the traces from different threads will be interleaved in the output).</li> </ul> <p>In summary, print statements are (generally) <em>static</em> and you'll need to re-compile to get additional information if your original statements weren't detailed enough. The IDE removes this static barrier, giving you a <em>dynamic</em> toolkit at your fingertips.</p> <p>When I first started coding, I couldn't understand what the big deal with debuggers was and I thought I could achieve anything with tracing (granted, that was on unix and the debugger was GDB). But once you learn how to properly use a graphical debugger, you don't want to go back to print statements.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload