lookichoice.blogg.se

Script debugger run on the main thread
Script debugger run on the main thread








It gets more complicated if your project executes codes parallel or asynchronous. You'll quickly lose track of which printed line corresponds to your code's print statement. Print statements are going to be on all over the project. And also if it's only for one time.īut as your code grow bigger, you're in trouble. Go ahead and use it if you intend to test whether your code reaches a point or to check a variable's value at a specific point. And it seems to work fine for smaller scripts too. Because that's the easiest and the most widely available choice. Naturally, anyone who wants to know what's happening in their code uses print statements. Perhaps 'print' is the most used Python function of all.

#Script debugger run on the main thread how to#

But they know how to find and fix them quickly. Related: You Are Not Still Using Virtualenv, Are You?ĭo check out the book, Debug It!: Find, Repair, and Prevent Bugs in Your Code because great programmers aren't the one who comes without any bugs. I'll take you through what I consider the bad, the lovely, and the smart ways of debugging a Python code in this post. Some had changed, and some I discontinued. To me, as a self-taught Python programmer, locating issues and fixing them in the quickest possible way was challenging.īut over the years, I learned several techniques to spot bugs in my scripts. I'm sure that's common with most code newbies.

script debugger run on the main thread

It took me some time to grasp the idea of debugging.








Script debugger run on the main thread