Debugging

20
Debugging

Transcript of Debugging

Page 1: Debugging

Debugging

Page 2: Debugging

Developer at Kuliza.

You can find me at:@[email protected]

Hello!I am Umang

Page 3: Debugging

Debugging

Debugging is the process of finding and resolving bugs or defects that prevent correct operation of computer software or a system.

DEBUGGING ?

Page 4: Debugging

If you don’t debug

you are a code genius

OR

you don’t know how!

Page 5: Debugging

Agenda

Python

DOM

Javascript

Network

Page 6: Debugging

Python Debugging

Page 7: Debugging

PyCharm

Page 8: Debugging

Python debugger (ipdb or pdb)

Install ipython and ipdb for all projects

import ipdb; ipdb.set_trace()

print locals(), args

continue, step over

Page 9: Debugging

Logging (smarter prints)

1. import logging2. 3. # create logger with 'error_log'4. logger = logging.getLogger('error_log')5. logger.setLevel(logging.DEBUG)6. 7. # logging things in logger8. logger.info('this is info')9. logger.errors('this is error')

10. logger.warning('this is warning')11. logger.debug('this is debug')

Page 10: Debugging

DOM Debugging

Page 11: Debugging

Let’s review some concepts

Page 12: Debugging

DOM Debugging

Rearrange/add/delete nodes

Edit attributes

Edit css

See the event listeners

Page 13: Debugging

Javascript Debugging

Page 14: Debugging

Javascript Debugging

Page 15: Debugging

Javascript Debugging

Set debug points

Use console

Set watch expressions

Continue, Step over, Step Into, Step Out

See stack trace to find calling function

Page 16: Debugging

NetworkDebugging

Page 17: Debugging

Network Debugging

Watch requests

Read headers and response

Learn cURL and postman!

Page 19: Debugging

Any Questions

Page 20: Debugging

Credits

Special thanks to all the people who made and released these awesome resources for free:

■ Presentation template by SlidesCarnival■ Photographs by Unsplash