5 ms·
@chubot (author) I'm curious what the debug experience is like. It looks like you're generating C++ code that maps pretty closely onto your statically typed Py
by mark_undoio 4y ago
@chubot (author) I'm curious what the debug experience is like. It looks like you're generating C++ code that maps pretty closely onto your statically typed Python code - is it straightforward to say "aha, it's that variable in C++ so it'll be the same name in Python"?
I'm wondering if it's possible to put some directives into the generated C++ code that would map its debug info directly back to source lines in the Python - I can't find any docs to confirm my feeling this should be possible.
Edit: Maybe this? https://gcc.gnu.org/onlinedocs/cpp/Line-Control.html https://gcc.gnu.org/onlinedocs/cpp/Line-Control.html
- chubot 4y agoOh yes I've been wondering about that too. I think what tipped me off about the feature is that I debugged some code using yacc, and it jumped right to the .y file. So yacc does that pretty effectively. So I think that would be cool, but I don't usually use a debugger in Python (or even C++ -- I tend to write small programs using shell as the "REPL"). Oil is extremely test-driven and shell's stdin/stdout type interfaces means it's pretty easy to exhaustively test. Examples: https://www.oilshell.org/release/0.13.1/test/spec.wwz/survey/osh.html https://www.oilshell.org/release/0.13.1/test/spec.wwz/survey... The GC is the one case we have where that kind of testing/debugging doesn't suffice! So I started watching the CppCon videos on debuggers a couple years ago and found some good talks :)