May 26, 2022
2 min read | ———

debugger; and ways for debugging your JS app

draftjavascriptjest

debugger keyword

I want to jump to the topic quickly so. this would be too long; don't read version.

.... .... ... ....

Let's talk about ways to debugging our JavaScript app in deep.

Ways to debugging your JavaScript app

... ...

Hardware vs. software pixels

So, the px unit is a bit of a lie. It doesn't actually map neatly onto hardware pixels.

If you look at a modern display under a microscope, you'll realize that they aren't made up of crisp little R/G/B rectangles anymore. Here are close-up shots of the screens on the Apple Watch and Apple iPhone:

Hardware vs. software pixels

So, the px unit is a bit of a lie. It doesn't actually map neatly onto hardware pixels.

If you look at a modern display under a microscope, you'll realize that they aren't made up of crisp little R/G/B rectangles anymore. Here are close-up shots of the screens on the Apple Watch and Apple iPhone:

1. console.log!

... ...

2. Set the breakpoint

... ...

3. debugger keyword

... ...

Is the debugger works in NodeJS?

... ...

it also works in NodeJS as well.

How about debugger on Editor (VSCode, IntelliJ)?

if you run NodeJS app with debugging mode in your editor. It should also work like this... ... ...

How about debugger on test runner (Jest, Vitest, etc...)

Yes! you can. if you debugging your test, it's the same way with running on your editor above!

Tips & Suggestion

... ...

https://eslint.org/docs/rules/no-debugger

also you should set https://eslint.org/docs/rules/no-console as well

Conclusion

... ...

The views and opinions expressed in this article are purely mine and do not necessarily reflect the positions of any companies for which I have worked in the past, present, or future.