How do i remove bugs from a code | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

How do i remove bugs from a code

11th Jul 2021, 4:58 PM
Joseph Haastrup
Joseph Haastrup - avatar
13 Answers
+ 7
Inspect the error message and see if it hint at what and where the bug is. Check the logic of the program. If you have problems with a particular code, please link it here and tag the relevant programming language.
11th Jul 2021, 5:07 PM
Lisa
Lisa - avatar
+ 5
TYeah ... don't we all want bugex spray? But sorrY...it is the hard way. You must understand bugs to get rid of them. Spend some attention... Oh that little beasts. No that was fun. Lisa said all u have to know.
11th Jul 2021, 5:23 PM
Oma Falk
Oma Falk - avatar
+ 4
Lisa I spray bug-ex onto monitor. Widearea . After I scroll the code to be sure that I touch every line of code. U know, here and there I have some syntactic sugar in my code... Attracts that little monsters like the thunderroll.
11th Jul 2021, 5:38 PM
Oma Falk
Oma Falk - avatar
+ 3
Oma Falk Pro tip: if you have a bug on your code and want to use your computer sometime again after debugging: Don't hit it to hard!!! 😉
11th Jul 2021, 5:35 PM
Lisa
Lisa - avatar
+ 2
Ok thanks
11th Jul 2021, 5:13 PM
Joseph Haastrup
Joseph Haastrup - avatar
+ 2
Oma Falk Oh, I know that: Once you have something sweet, they appear everywhere! And when your python swallows some them... that's when you start to consider the more radical measures 😂
11th Jul 2021, 5:51 PM
Lisa
Lisa - avatar
+ 2
First you have to find them. - Insert print statements to inspect variable values - pretend you are the computer and step through the program mentally while keeping track of variables on paper. Removing them can be a simple logic correction, or it might entail redesign to compensate for unanticipated operation. If needed, use the eXtreme Programming mantra: "Refactor ruthlessly!"
11th Jul 2021, 7:32 PM
Brian
Brian - avatar
+ 2
One by one
13th Jul 2021, 12:32 PM
🍂B. Eitan 🌵
🍂B. Eitan 🌵 - avatar
+ 1
Joseph Haastrup Add enough comments in your code.
12th Jul 2021, 6:55 AM
Calvin Thomas
Calvin Thomas - avatar
+ 1
Write code with no bugs 😁
13th Jul 2021, 12:34 PM
🍂B. Eitan 🌵
🍂B. Eitan 🌵 - avatar
0
Use debugging tools in editor like VS code (https://code.visualstudio.com/docs/editor/debugging )and go through each line. If you're coding in JavaScript open devTools (https://developer.mozilla.org/en-US/docs/Learn/Common_questions/What_are_browser_developer_tools ) in the browser and go through the code.
12th Jul 2021, 1:52 AM
Roopesh
Roopesh - avatar
0
Verify your code @code verifier on apple store it helps
13th Jul 2021, 3:06 PM
Davis Kunyu
Davis Kunyu - avatar