.ﺪﻫﺩ ﺥﺭ (ﺎﻄﺧ) ﺖﺳﺍ ﻦﮑﻤﻣ ،ﺪﯿﺴﯾﻮﻧ ﯽﻣ ﯼﺪﯾﺪﺟ ﯼﺮﺗﻮﯿﭙﻣﺎﮐ ﯼﺎﻫﺪﮐ ﺎﻤﺷ ﻪﮐ ﺭﺎﺑ ﺮﻫ
.ﺪﺷﺎﺑ ﯽﻘﻄﻨﻣ ﯼﺎﻫﺎﻄﺧ ﺎﯾ ﯼﻮﺤﻧ ﯼﺎﻫﺎﻄﺧ ﯼﻭﺎﺣ ﺖﺳﺍ ﻦﮑﻤﻣ ﯽﺴﯾﻮﻧ ﻪﻣﺎﻧﺮﺑ ﺪﮐ
.ﺖﺳﺍ ﺭﺍﻮﺷﺩ ﺎﻫﺎﻄﺧ ﻦﯾﺍ ﺯﺍ ﯼﺭﺎﯿﺴﺑ ﺺﯿﺨﺸﺗ
ﺩﺭﺍﺩ ﺩﻮﺟﻭ .ﺪﺘﻓﺍ ﯽﻤﻧ ﯽﻗﺎﻔﺗﺍ ﭻﯿﻫ ،ﺪﺷﺎﺑ ﺎﻄﺧ ﯼﻭﺎﺣ ﯽﺴﯾﻮﻧ ﻪﻣﺎﻧﺮﺑ ﺪﮐ ﻪﮐ ﯽﻧﺎﻣﺯ ،ﺐﻠﻏﺍ
.ﺪﻨﯾﻮﮔ ﯽﻣ ﺪﮐ ﯽﯾﺍﺩﺯ ﻝﺎﮑﺷﺍ ،ﯽﺴﯾﻮﻧ ﻪﻣﺎﻧﺮﺑ ﺪﮐ ﺭﺩ ﺎﻫﺎﻄﺧ (ﻊﻓﺭ ﻭ) ﯼﻮﺠﺘﺴﺟ ﻪﺑ
ﺪﻨﺘﺴﻫ ﯽﻠﺧﺍﺩ ﮏﯾ ﯼﺍﺭﺍﺩ ﻥﺭﺪﻣ ﯼﺎﻫﺮﮔﺭﻭﺮﻣ ﻪﻤﻫ ،ﻪﻧﺎﺘﺨﺒﺷﻮﺧ ﺎﻣﺍ .ﺖﺴﯿﻧ ﻥﺎﺳﺁ ﯽﯾﺍﺩﺯ ﻝﺎﮑﺷﺍ
ﺩﺮﮐ ﺵﺭﺍﺰﮔ ﻪﺑ ﺭﻮﺒﺠﻣ ﺍﺭ ﺎﻫﺎﻄﺧ ﻭ ﺩﺮﮐ ﺵﻮﻣﺎﺧ ﻭ ﻦﺷﻭﺭ ﻥﺍﻮﺗ ﯽﻣ ﺍﺭ ﯽﻠﺧﺍﺩ ﯼﺎﻫﺍﺩﺯ ﻝﺎﮑﺷﺍ
ﺪﯿﻨﮐ ﻢﯿﻈﻨﺗ ﺍﺭ (ﺩﻮﺷ ﯽﻣ ﺍﺮﺟﺍ ﺪﮐ ﻥﺁ ﺭﺩ ﻪﮐ ﯽﯾﺎﻫ ﻥﺎﮑﻣ) ﺖﺴﮑﺷ ﻁﺎﻘﻧ ﺪﯿﻧﺍﻮﺗ ﯽﻣ ﻦﯿﻨﭽﻤﻫ ﺎﻤﺷ ،ﺮﮔﺎ
ﺎﺑ ﺩﻮﺧ ﺮﮔﺭﻭﺮﻣ ﺭﺩ ﺍﺭ ﯽﯾﺍﺩﺯ ﻝﺎﮑﺷﺍ ،(ﺪﯿﻨﮐ ﻝﺎﺒﻧﺩ ﺍﺭ ﻪﺤﻔﺻ ﻦﯾﺍ ﻦﯿﯾﺎﭘ ﻞﺣﺍﺮﻣ ﺕﺭﻮﺻ ﻦﯾﺍ ﺮﯿﻏ ﺭﺩ)
ﯼﺍﺮﺑ console.log()
ﺯﺍ ﺪﯿﻧﺍﻮﺗ ﯽﻣ ،ﺪﻨﮐ ﯽﻣ ﯽﻧﺎﺒﯿﺘﺸﭘ ﯽﯾﺍ
<!DOCTYPE html>
<html>
<body>
<h1>My First Web Page</h1>
<script>
a = 5;
b = 6;
c = a + b;
console.log(c);
</script>
</body>
</html>
→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html>
<body>
<h2>My First Web Page</h2>
<p>Activate debugging in your browser (Chrome, IE, Firefox) with F12, and select "Console" in the debugger menu.</p>
<script>
a = 5;
b = 6;
c = a + b;
console.log(c);
</script>
</body>
</html>
ﻪﺘﮑﻧ: ﺵﻭﺭ ﻩﺭﺎﺑﺭﺩ console.log()
ﺪﯿﻧﺍ
.ﺪﯿﻨﮐ ﻦﯿﯿﻌﺗ ﺖﭙﯾﺮﮑﺳﺍ ﺍﻭﺎﺟ ﺪﮐ ﺭﺩ ﺍﺭ ﺖﺴﮑﺷ ﻁﺎﻘﻧ ﺪﯿﻧﺍﻮﺗ ﯽﻣ ،ﺮﮔﺎﺒﯾﺩ ﻩﺮﺠﻨﭘ ﺭﺩ
ﺪﯿﻨﮐ ﯽﺳﺭﺮﺑ ﺪﻫﺩ ﯽﻣ ﻥﺎﮑﻣﺍ ﺎﻤﺷ ﻪﺑ ﻭ ﺩﻮﺷ ﯽﻣ ﻒﻗﻮﺘﻣ ﺖﭙﯾﺮﮑﺳﺍ ﺍﻭﺎﺟ ﯼﺍﺮﺟﺍ ،ﺖﺴﮑﺷ ﻪﻄﻘﻧ ﺮﻫ ﺭﺩ
ﺎﺑ ﻻًﻮﻤﻌﻣ) ﺪﯾﺮﯿﮕﺑ ﺮﺳ ﺯﺍ ﺍﺭ ﺪﮐ ﯼﺍﺮﺟﺍ ﺪﯿﻧﺍﻮﺗ ﯽﻣ ،ﺮﯾﺩﺎﻘﻣ ﯽﺳﺭﺮﺑ ﺯﺍ ﺲﭘ
،ﺪﻨﮐﯽﻣ ﻒﻗﻮﺘﻣ ﺍﺭ ﺖﭙﯾﺮﮑﺳﺍ ﺍﻭﺎﺟ ﯼﺍﺮﺟﺍ ﺍﺩﺯﻝﺎﮑﺷﺍ<"code class="w3-codespan
.ﺪﻨﮐ ﯽﻣ ﻢﯿﻈﻨﺗ ﺮﮔﺎﺒﯾﺩ ﺭﺩ ﺖﺴﮑﺷ ﻪﻄﻘﻧ ﮏﯾ ﻪﮐ ﺩﺭﺍﺩ ﺍﺭ ﯼﺩﺮﮑﻠﻤﻋ ﻥﺎﻤﻫ ﻦﯾﺍ
.ﺩﺭﺍﺪﻧ ﯼﺮﯿﺛﺄﺗ ﺮﮔﺎﺒﯾﺩ ﺭﻮﺘﺳﺩ ،ﺪﺷﺎﺒﻧ ﺱﺮﺘﺳﺩ ﺭﺩ ﯽﯾﺍﺩﺯ ﻝﺎﮑﺷﺍ ﺮﮔﺍ
ﺩﻮﺷ ﯽﻣ ﻒﻗﻮﺘﻣ ﻥﺁ ﺯﺍ ﻞﺒﻗ ﺪﮐ ﻦﯾﺍ ﯼﺍﺮﺟﺍ ،ﺮﮔﺎﺒﯾﺩ ﻥﺩﻮﺑ ﻦﺷﻭﺭ ﺎﺑ
let x = 15 * 5;
debugger;
document.getElementById("demo").innerHTML = x;
→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript Debugger</h2>
<p id="demo"></p>
<p>With the debugger turned on, the code below should stop executing before it executes the third line.</p>
<script>
let x = 15 * 5;
debugger;
document.getElementById("demo").innerHTML = x;
</script>
</body>
</html>
.ﺪﯿﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ﺮﮔﺎﺒﯾﺩ ﯼﻮﻨﻣ ﺭﺩ ﺍﺭ "ﻝﻮﺴﻨﮐ" ﻭ ﺪﯿﻨﮐ ﯽﻣ ﻝﺎﻌﻓ F12 ﺎﺑ ﺩﻮﺧ ﺮﮔﺭﻭﺮﻣ ﺭﺩ ﺍﺭ ﯽﯾﺍﺩ
:ﺪﯿﻨﮐ ﻝﺎﺒﻧﺩ ﺍﺭ ﻞﺣﺍﺮﻣ ﻦﯾﺍ ﺕﺭﻮﺻ ﻦﯾﺍ ﺮﯿﻏ ﺭﺩ
.ﺪﯿﻨﮐ ﺯﺎﺑ ﺍﺭ ﺮﮔﺭﻭﺮﻣ
.ﺪﯿﻨﮐ ﺏﺎﺨﺘﻧﺍ ﺍﺭ "ﺮﺘﺸﯿﺑ ﯼﺎﻫﺭﺍﺰﺑﺍ" ،ﻮﻨﻣ ﺯﺍ
.ﺪﯿﻨﮐ ﺏﺎﺨﺘﻧﺍ ﺍﺭ «ﻩﺪﻨﻫﺩﻪﻌﺳﻮﺗ ﺭﺍﺰﺑﺍ» ،ﺎﻫﺭﺍﺰﺑﺍ ﻥﺎﯿﻣ ﺯﺍ
.ﺪﯿﻨﮐ ﺏﺎﺨﺘﻧﺍ ﺍﺭ Console ﺖﯾﺎﻬﻧ ﺭﺩ
.ﺪﯿﻨﮐ ﺯﺎﺑ ﺍﺭ ﺮﮔﺭﻭﺮﻣ
.ﺪﯿﻨﮐ ﺏﺎﺨﺘﻧﺍ ﺍﺭ "ﺏﻭ ﺲﯾﻮﻧ ﻪﻣﺎﻧﺮﺑ" ،ﻮﻨﻣ ﺯﺍ
.ﺪﯿﻨﮐ ﺏﺎﺨﺘﻧﺍ ﺍﺭ Web Console ﻪﻨﯾﺰﮔ ﺖﯾﺎﻬﻧ ﺭﺩ
.ﺪﯿﻨﮐ ﺯﺎﺑ ﺍﺭ ﺮﮔﺭﻭﺮﻣ
.ﺪﯿﻨﮐ ﺏﺎﺨﺘﻧﺍ ﺍﺭ "ﻩﺪﻨﻫﺩ ﻪﻌﺳﻮﺗ ﺭﺍﺰﺑﺍ" ،ﻮﻨﻣ ﺯﺍ
.ﺪﯿﻨﮐ ﺏﺎﺨﺘﻧﺍ ﺍﺭ "ﻝﻮﺴﻨﮐ" ﺖﯾﺎﻬﻧ ﺭﺩ
.ﺪﯿﻨﮐ ﺯﺎﺑ ﺍﺭ ﺮﮔﺭﻭﺮﻣ
.ﺪﯿﻨﮐ ﺏﺎﺨﺘﻧﺍ ﺍﺭ "Developer" ،ﻮﻨﻣ ﺯﺍ
.ﺪﯿﻨﮐ ﺏﺎﺨﺘﻧﺍ ﺍﺭ "Developer"، "Developer tools" ﺯﺍ
.ﺪﯿﻨﮐ ﺏﺎﺨﺘﻧﺍ ﺍﺭ "ﻝﻮﺴﻨﮐ" ﺖﯾﺎﻬﻧ ﺭﺩ
.ﺪﯾﻭﺮﺑ Safari، Preferences، Advanced ﻪﺑ ﯽﻠﺻﺍ ﯼﻮﻨﻣ ﺭﺩ
.ﺪﯿﻧﺰﺑ ﺖﻣﻼﻋ ﺍﺭ "ﻮﻨﻣ ﺭﺍﻮﻧ ﺭﺩ ﻪﻌﺳﻮﺗ ﯼﻮﻨﻣ ﺶﯾﺎﻤﻧ ﻥﺩﺮﮐ ﻝﺎﻌﻓ"
ﺪﯿﻨﮐ ﺏﺎﺨﺘﻧﺍ ﺍﺭ "ﺎﻄﺧ ﺶﯾﺎﻤﻧ"
:ﺪﺷ ﺮﻫﺎﻇ ﻮﻨﻣ ﺭﺩ "Develop" ﺪﯾﺪﺟ ﻪﻨﯾﺰﮔ ﻪﮐ ﯽﻣﺎﮕﻨﻫ
.ﺖﺳﺍ ﯼﺮﺗﻮﯿﭙﻣﺎﮐ ﯼﺎﻫ ﻪﻣﺎﻧﺮﺑ ﺭﺩ (ﺎﻫﺎﻄﺧ) ﺎﻫ ﮒﺎﺑ ﺶﻫﺎﮐ ﻭ ﻦﺘﻓﺎﯾ ،ﺶﯾﺎﻣﺯﺁ ﺪﻨﯾﺁﺮﻓ ﯽﯾﺍﺩﺯ ﻝﺎﮑ