Debugging state that changes too fast

When everything keeps moving Some bugs do not come from a wrong value, but from state changing too fast to be read properly. Between two logs, the data has already moved on. The console then makes everything feel unstable, while the real issue is the pace of updates. A common trap in reactive interfaces In … Read more

Why this object does not have the expected value

A familiar situation The object is there. The properties too. Yet the displayed value does not match what was expected. This situation is common and rarely caused by a simple typo. References and mutations In many cases, the object was modified elsewhere after the moment it was thought to be observed. As explained in the … Read more

The console lies about time

A common illusion The console often gives the impression that everything happens linearly. Logs appear one after another in a reassuring order. But this order is a reconstruction, not always a faithful representation of real time. Display versus execution Displaying a log and executing code are not exactly the same thing. Delays, queues, and internal … Read more

Removing logs is also part of the job

An often forgotten reflex Adding logs is a basic debugging reflex. Removing them is much less common. Yet, obsolete logs can become just as harmful as bad ones. The hidden cost of useless logs Every useless log adds a bit of cognitive load. Individually, it feels negligible. Accumulated, it is not. Reading slows down, errors … Read more

When a log turns into noise

When the console becomes unreadable A useful log can quickly become a problem if it is repeated too often or left in place for too long. The console fills up, important information gets buried, and reading becomes harder than having nothing. Silent accumulation Logs added “temporarily” tend to stay. Each one looks harmless on its … Read more

Synchronous and asynchronous logs: what the console does not show

An order that looks logical When reading logs in the console, the display order often feels like it reflects the real execution order. In practice, this is not always true. As soon as asynchronous code is involved, the console can give a partial or misleading view. Mixing synchronous and asynchronous logs A console.log executed inside … Read more

Writing logs that actually help understand a bug

Logs as a thinking tool A log is not just text output. It is a way to structure thinking when facing a bug. Before writing a log, it often helps to clearly define what needs to be verified. Providing context An isolated log is rarely enough. Context around the value is often what makes it … Read more

Debugging without breakpoints: staying in the flow

Interrupting or observing Breakpoints are useful, but they are not always the best first option. Pausing execution often breaks the natural reading of what is happening. The console allows another approach: observing without interrupting. Following the real execution flow With well placed logs, it becomes possible to follow the actual call sequence without freezing state. … Read more

What the console really says when “it works on my machine”

A sentence that often hides an issue “It works on my machine” is rarely a satisfying conclusion. It often means something is still escaping observation. In the browser, the console plays a central role in this gap. It shows what happens locally, in a very specific context, with a state that may differ from another … Read more

Reading objects in the console without fooling yourself

What we think we see Reading an object in the console seems simple. You log it, expand it, and inspect its properties. In practice, what the console shows is not always what the code had at the exact moment of the log. This is a common source of confusion, especially when state changes quickly or … Read more