[Javasciprt] debugging ๋ฐฉ๋ฒ•

์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ debugging ํ•˜๋Š” ๋ฐฉ๋ฒ•์œผ๋กœ๋Š” ์—ฌ๋Ÿฌ๊ฐ€๊ธฐ๊ฐ€ ์žˆ๋Š”๋ฐ ๋Œ€ํ‘œ์ ์œผ๋กœ๋Š”
๋‹ค๋“ค break point๋ฅผ ์ด์šฉํ•ด์„œ ์—๋””ํ„ฐ ์ƒ์—์„œ ์ฐ์–ด๋†“๊ฑฐ๋‚˜, ํฌ๋กฌ ๊ฐœ๋ฐœ์ž ๋„๊ตฌ๋ฅผ ์ด์šฉํ•ด์„œ break point๋ฅผ ์ฐ์–ด ์‚ฌ์šฉํ•  ๊ฒƒ์ด๋‹ค.
์†Œ์†Œํ•˜์ง€๋งŒ ๋‹ค๋ฅธ๋ฐฉ๋ฒ• ํ•˜๋‚˜๋ฅผ ์†Œ๊ฐœํ•ด์ฃผ๋ ค๊ณ  ํ•œ๋‹ค.

<!doctype html>
<html>
  <head>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  </head>
  <body>
    <button id="btn">๋ฒ„ํŠผ</button>
  </body>
  <script type="text/javascript">
    $('#btn').on('click', function () {
      debugger; //break point
      alert('์•ˆ๋…•');
    });
  </script>
</html>

์ด์™€ ๊ฐ™์ด ์ง์ ‘ ์ฝ”๋“œ์ƒ์œผ๋กœ break point๋ฅผ ์‚ฝ์ž…ํ•  ์ˆ˜ ์žˆ๋‹ค. ๋‹ค์‹œ ์ง€์›Œ์ค˜์•ผํ•˜๋Š” ๋ฒˆ๊ฑฐ๋กœ์›€์ด ์žˆ์ง€๋งŒ
์ดํด๋ฆฝ์Šค๋กœ JS๋ฅผ ์ž‘์—…ํ•˜๋‹ค๋ณด๋ฉด ์œ ์šฉํ•˜๊ฒŒ ์‚ฌ์šฉํ•˜๋Š”๋‚ ์ด ์˜ฌ๊ฒƒ์ด๋‹ค.

๋‹ค๋ฅธ ๊ธ€ ์ฝ์–ด๋ณด๊ธฐ โฌ‡๏ธ