<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Yukira Sato</title>
    <description>The latest articles on DEV Community by Yukira Sato (@yukira_sato_543fe542e6220).</description>
    <link>https://dev.to/yukira_sato_543fe542e6220</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4249976%2F19b5224c-7bec-4e06-b7d5-a310baccafba.png</url>
      <title>DEV Community: Yukira Sato</title>
      <link>https://dev.to/yukira_sato_543fe542e6220</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yukira_sato_543fe542e6220"/>
    <language>en</language>
    <item>
      <title>Debugging Is a Process, Not a Guess: 5 Habits Every Developer Should Build</title>
      <dc:creator>Yukira Sato</dc:creator>
      <pubDate>Tue, 17 Nov 2026 14:02:56 +0000</pubDate>
      <link>https://dev.to/yukira_sato_543fe542e6220/debugging-is-a-process-not-a-guess-5-habits-every-developer-should-build-490a</link>
      <guid>https://dev.to/yukira_sato_543fe542e6220/debugging-is-a-process-not-a-guess-5-habits-every-developer-should-build-490a</guid>
      <description>&lt;h1&gt;
  
  
  Debugging Is a Process, Not a Guess: 5 Habits Every Developer Should Build
&lt;/h1&gt;

&lt;p&gt;Let's be honest: debugging can sometimes be more frustrating than writing the actual code. 😂&lt;/p&gt;

&lt;p&gt;We've all experienced that moment when everything looks correct, but the application refuses to behave as expected.&lt;/p&gt;

&lt;p&gt;You change one line, run the application, and suddenly three other things break.&lt;/p&gt;

&lt;p&gt;I wanted to write this article because debugging is an essential skill that doesn't always get enough attention, especially when we're learning to code. We spend so much time learning frameworks, languages, and new technologies that sometimes we forget to develop the ability to troubleshoot problems effectively.&lt;/p&gt;

&lt;p&gt;Whether you're a beginner or an experienced developer, I hope these practical tips help you approach debugging with more confidence.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Reproduce the Problem First
&lt;/h2&gt;

&lt;p&gt;Before touching your code, understand what's actually happening.&lt;/p&gt;

&lt;p&gt;Ask yourself:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What did I expect to happen?&lt;/li&gt;
&lt;li&gt;What happened instead?&lt;/li&gt;
&lt;li&gt;Can I reproduce the issue?&lt;/li&gt;
&lt;li&gt;Does it happen with every input or only specific ones?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;calculateDiscount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;price&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;discount&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;discount&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;calculateDiscount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// Expected: 80&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now imagine someone passes unexpected values.&lt;/p&gt;

&lt;p&gt;The first step isn't randomly changing the function. It's understanding the conditions under which the problem occurs.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Learn to Read Error Messages
&lt;/h2&gt;

&lt;p&gt;Error messages are not your enemies. They're clues.&lt;/p&gt;

&lt;p&gt;Consider this example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'll receive an error similar to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;TypeError: Cannot read properties of null
(reading 'name')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of immediately searching for a solution, ask yourself:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why is &lt;code&gt;user&lt;/code&gt; null?&lt;/li&gt;
&lt;li&gt;Where was this variable supposed to receive its value?&lt;/li&gt;
&lt;li&gt;Is the problem coming from the database or application logic?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Understanding the cause is more valuable than simply making the error disappear.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Break the Problem Into Smaller Pieces
&lt;/h2&gt;

&lt;p&gt;Imagine you're developing a web application, and suddenly your API starts returning an empty response even though your database contains records.&lt;/p&gt;

&lt;p&gt;Where would you start?&lt;/p&gt;

&lt;p&gt;I'd investigate the request step by step:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Client Request
      |
      v
API Controller
      |
      v
Business Logic
      |
      v
Database Query
      |
      v
Response Mapping
      |
      v
JSON Response
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also use logging:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Request received:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Database results:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Filtered data:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;filteredResults&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Final response:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You might discover that the database query works perfectly, but a filtering condition accidentally excludes every record.&lt;/p&gt;

&lt;p&gt;Breaking down a problem makes it much easier to identify its actual cause.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Change One Thing at a Time
&lt;/h2&gt;

&lt;p&gt;One common debugging mistake is changing multiple things simultaneously.&lt;/p&gt;

&lt;p&gt;Try this approach:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Identify a possible cause.&lt;/li&gt;
&lt;li&gt;Make one small change.&lt;/li&gt;
&lt;li&gt;Run the application again.&lt;/li&gt;
&lt;li&gt;Check whether the behavior changed.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This helps you understand what actually fixed the problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Always Verify Your Fix
&lt;/h2&gt;

&lt;p&gt;Getting rid of an error doesn't necessarily mean you've solved the problem.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;calculateDiscount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c1"&gt;// 80&lt;/span&gt;
&lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;calculateDiscount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c1"&gt;// 180&lt;/span&gt;
&lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;calculateDiscount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;    &lt;span class="c1"&gt;// 50&lt;/span&gt;
&lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;calculateDiscount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// 0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Test different inputs, consider edge cases, and make sure your changes haven't introduced another issue.&lt;/p&gt;

&lt;p&gt;If possible, write automated tests to prevent the same problem from returning.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Debugging Checklist
&lt;/h2&gt;

&lt;p&gt;Whenever you encounter an unexpected bug, try following this process:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reproduce the issue.&lt;/li&gt;
&lt;li&gt;Read the error message carefully.&lt;/li&gt;
&lt;li&gt;Identify the affected component.&lt;/li&gt;
&lt;li&gt;Isolate the root cause.&lt;/li&gt;
&lt;li&gt;Change one thing at a time.&lt;/li&gt;
&lt;li&gt;Test your solution.&lt;/li&gt;
&lt;li&gt;Add a regression test if possible.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Debugging isn't about being the developer who never makes mistakes.&lt;/p&gt;

&lt;p&gt;It's about becoming someone who knows how to investigate problems, understand their causes, and find reliable solutions.&lt;/p&gt;

&lt;p&gt;You don't need to know everything. Sometimes patience and a systematic approach are your best debugging tools.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stop guessing. Start investigating.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's Discuss!
&lt;/h2&gt;

&lt;p&gt;I'd love to hear from other developers, especially those who are still learning.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;What's the most frustrating bug you've ever encountered?&lt;/li&gt;
&lt;li&gt;Do you prefer using breakpoints, console logging, or debugging tools?&lt;/li&gt;
&lt;li&gt;What's one debugging trick you wish you had learned earlier?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And if you're a beginner and have questions about debugging, feel free to leave them in the comments. I'll be happy to discuss them!&lt;/p&gt;

&lt;p&gt;Let's learn from each other. 🚀&lt;/p&gt;

&lt;h1&gt;
  
  
  programming #beginners #debugging #softwareengineering #webdev
&lt;/h1&gt;

</description>
      <category>coding</category>
      <category>debugging</category>
      <category>programming</category>
      <category>softwaredevelopment</category>
    </item>
  </channel>
</rss>
