+ 4
How do i remove bugs from a code
13 Antworten
+ 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.
+ 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.
+ 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.
+ 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!!! 😉
+ 2
Ok thanks
+ 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!"
+ 2
One by one
+ 1
Joseph Haastrup Add enough comments in your code.
+ 1
Write code with no bugs 😁
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.
0
Verify your code
@code verifier on apple store it helps