That sounds like a good improvement. I am sorry for your frustration and admit that this project has been neglected for some time now. Perhaps in the future I will be able to lend a hand again but for now others will need to step up PRs welcome.
The code on master is already Python 3 so we do not need PRs but instead we need a release of the current master. No, sorry.
I haven't forgotten but neither have I carved out time to work on this yet. Thanks for the nudge. Once I get started I think that'd be helpful for getting it over the finish line. Skip to content. This repository has been archived by the owner. It is now read-only. Star 3. Python 2. Copy link. Why the tool still Install python 2. Starting installation Building Boost Python.
These instructions are for Windows only Contents. Category : Development. Some breakpoints in Python can be surprising for developers who have worked with other programming languages. In Python, the entire file is executable code, so Python runs the file when it's loaded to process any top-level class or function definitions. If a breakpoint has been set, you may find the debugger breaking part-way through a class declaration.
This behavior is correct, even though it's sometimes surprising. You can customize the conditions under which a breakpoint is triggered, such as breaking only when a variable is set to a certain value or value range. To set conditions, right-click the breakpoint's red dot, select Condition , then create expressions using Python code. For full details on this feature in Visual Studio, see Breakpoint conditions.
When setting conditions, you can also set Action and create a message to log to the output window, optionally continuing execution automatically. Logging a message creates what is called a tracepoint without adding logging code to your application directly:. Once stopped at a breakpoint, you have various ways to step through code or run blocks of code before breaking again.
These commands are available in a number of places, including the top debug toolbar, the Debug menu, on the right-click context menu in the code editor, and through keyboard shortcuts though not all commands are in all places :.
When stopped in the debugger, you can inspect and modify the values of variables. You can also use the Watch window to monitor individual variables as well as custom expressions. See Inspect variables for general details. To view a value using DataTips , simply hover the mouse over any variable in the editor. You can click on the value to change it:. You can double-click in the value column or select and press F2 to edit the value:. Expressions are reevaluated for each step:. When inspecting a string value str , unicode , bytes , and bytearray are all considered strings for this purpose , a magnifying glass icon appears on the right side of the value.
Clicking the icon displays the unquoted string value in a popup dialog, with wrapping and scrolling, which is useful for long strings. If an error occurs in your program during debugging, but you don't have an exception handler for it, the debugger breaks at the point of the exception:. At this point you can inspect the program state, including the call stack. However, if you attempt to step through the code, the exception continues being thrown until it is either handled or your program exits.
The checkbox for each exception controls whether the debugger always breaks when it is raised. Check this box when you want to break more often for a particular exception. By default, most exceptions break when an exception handler cannot be found in the source code. To change this behavior, right-click any exception and modify the Continue When Unhandled in User Code option.
Clear this box when you want to break less often for an exception. To configure an exception that does not appear in this list, click the Add button to add it. One thing that can give you at least a little more info is to use the Google breakpad C library to report a C stack trace when the segfault occurs. You may want to try David Malcolm's tool CPyChecker which statically analyses C extensions for memory leaks and other bugs.
The tool is documented here. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 9 years, 5 months ago. Active 6 years, 6 months ago. Viewed 9k times. Community Bot 1 1 1 silver badge. I admit I've never tried to debug a Python C extension on Windows, but have you tried attaching a debugger to the Python process?
That's good. I've taken the liberty of adding a bounty on your SO question. As far as "debugging in general" - if you feel comfortable with MSVS - then by all means try rebuilding and see what happens. I suspect you'll probably be sad Some hints: Install and enable faulthandler. Install a debugger for Windows, e. Visual Studio Rebuild pyodbc with debug symbols using msvc9 compiler.
0コメント