Editing: process


process

App sepecfic vs general

Process

Obsidian

Git cmds

Git logging

Git branching

Git remote

Git Flows :

\ make current commit seprate branch named mock-login and hard reset with remote to previous commit

Tech specefic

.net

Skey:

VS

VS-code

Dev flow

Skills

Postman

How to use

Docs

Try entering "123456" and let me know if you see the CheckOtp debug output.

Explain debug-driven development methodology

Tell me developement process whic uses debug ouput statment to find where is issue in code based on missing debug oupts

Questions llm usch it is determis it ouput ? *

Debug Output Analysis Process

I identified the issue location using debug output flow analysis:

1. Expected Debug Flow

[GetOtp] → [CheckOtp] → [Database Response]

2. Actual Debug Flow

[GetOtp] ✅ Present
[CheckOtp] ❌ Missing  
[Database Response] ❌ Missing

3. Logical Deduction

Since GetOtp succeeded but CheckOtp never appeared, the issue is between these two points.

Development Debug Process

Step 1: Add Debug Statements at Entry Points

// At start of each major function
System.Diagnostics.Debug.WriteLine("[FunctionName] Starting...");

Step 2: Add Debug at Decision Points

// Before API calls, database calls, conditions
System.Diagnostics.Debug.WriteLine("[FunctionName] About to call API...");
if (condition) {
    System.Diagnostics.Debug.WriteLine("[FunctionName] Condition true");
} else {
    System.Diagnostics.Debug.WriteLine("[FunctionName] Condition false");
}

Step 3: Add Debug at Exit Points

// Before returns, after operations
System.Diagnostics.Debug.WriteLine("[FunctionName] Completed successfully");
System.Diagnostics.Debug.WriteLine("[FunctionName] Error: " + ex.Message);

Step 4: Analyze Missing Logs

Step 5: Narrow Down

Add more granular debug statements around the last successful log point.

Example Debug Strategy

// Mobile app OTP verification
public async Task<int> checkotp_Get(string mobile, string otp)
{
    Debug.WriteLine("[CheckOtp-Client] Starting verification"); // ✅ Should appear

    if (networkCheck) {
        Debug.WriteLine("[CheckOtp-Client] Network OK"); // ✅ Should appear

        var response = await httpClient.GetAsync(url);
        Debug.WriteLine("[CheckOtp-Client] API called"); // ❌ If missing = network/URL issue

        var result = await response.Content.ReadAsStringAsync();
        Debug.WriteLine("[CheckOtp-Client] Response received"); // ❌ If missing = API timeout
    }
}

This systematic approach quickly isolates where code execution stops, making debugging much faster than guessing.