-
Notifications
You must be signed in to change notification settings - Fork 36
Discussing Debugger Support For Xeus-cpp #282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Pain Points until now
While performing above checks and experiments, we found that if function definition and function call are in the same cell, then the step-in call from the function call behaves normally, i.e. it steps-in directly in one call. But when they are in different cells, then it takes multiple step-in calls to step into the function definition from the function call.
As can be seen we call run_code multiple times to replicate Multiple cells of JIT compiled code !!!
fffffff.mp4Probably @vgvassilev might know the root cause here and could educate us with some insights. |
Continuing the discussion on the above pain pointFollowing are the lldb outputs when trying for both the cases: a) When function definition and call are in the same cell
b) When function definition and call are in different cell
Here, I observed that the intermediate functions do not contain debug symbols, i.e. they don't have any function names. That's why the debugger in vs-code shows them as Unknown Sources. |
One possible workaround is to internally implement a loop of stepIn + stackTrace requests until the source field of the stackTraceResponse matches a known cell. Then the last stepIn response can be returned to the frontend. The only thing to be careful of is the request_seq of the response, that should be set to the sequence number of the initial stepIn request. |
More Pain PointsStepping-over(next) on a function call declared in previous block/cell does not work properly.
In the given video below,
// input_line_1
#include <iostream>
void f1() {
std::cout << "in f1 function" << std::endl;
}
void f2() {
std::cout << "in f2 function" << std::endl;
}
void f3() {
std::cout << "in f3 function" << std::endl;
}
std::cout << "In codeblock 1" << std::endl;
int a = 100;
int b = 1000;
f1();
f2();
f3(); // input_line_2
std::cout << "In codeblock 2" << std::endl;
std::cout << "a = " << a << std::endl;
std::cout << "b = " << b << std::endl;
void f4() {
std::cout << "in f4 function" << std::endl;
f2();
}
f3();
f2(); Above is shown in this video. mult-sing.mp4But, let's say in mult2.mp4The problem is how stepping-in inside the last call of |
Hey All,
I have been doing quite some back and forth with @kr-2003 for discussing some design details for the debugger. We think we've made quite some progress and would like to point out possible pain-points that came out of our discussion.
What has been achieved
We have already set up debugging in VSCode using LLDB-DAP. The following video demo showcases how JIT-compiled code can be debugged using LLDB, LLDB-DAP, and VSCode. For our project, we need to integrate LLDB-DAP with Jupyter Notebook.
debugg.1.mp4
Steps to replicate the above
PRE-REQUISITES : Install lldb and lldb-dap executable in your toolchain (should be pre-installed in macos). You can also install the lldb-dap extension for vs-code.
test.cxx
for startersBy default, the VS Code extension will expect to find lldb-dap in your PATH. Alternatively, you can explictly specify the location of the lldb-dap binary using the lldb-dap.executable-path setting.
input_line_1
file which acts as a source that the debugger uses for mapping addresses.The text was updated successfully, but these errors were encountered: