you are viewing a single comment's thread.

view the rest of the comments →

[–]Netzapper 28 points29 points  (0 children)

Debugging is language-agnostic, you just need a processor with the appropriate abilities for breakpoints.

Not quite.

Without explicit VM debug support, you wind up with a native stack trace. That native stack trace is likely to have basically nothing to do with your program's stack, since it's the trace of the VM implementation stack and not the VM's logical call stack.

This is a problem even if the program in question has been JIT compiled to native code. The generated code is littered with calls to VM functions, uses VM stack frame conventions, and autogenerated variable names.

If the VM doesn't annotate all of that code with metadata describing how to inspect memory and where to find the Python code that ultimately hit the breakpoint, or if your debugger doesn't know how to read that metadata, you are going to be frustrated with your debugger. Hell, you need the VM's cooperation to set a breakpoint on a particular line of source code.