-
Notifications
You must be signed in to change notification settings - Fork 11
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
How to see current execution line lower in stack #185
Comments
The expected/intended behavior for this is the following:
To debug package code, it is recommended to use the debug config entry Note that the debugger tries to hide stack frames belonging to its own function calls. If you suspect that some of your own frames are hidden, you can chekc by setting the R option If this is not the behavior you get, please post a reproducible example, so I can have a look! |
Dear Manuel,
Apologies for the late reply, just haven’t yet had the time to test it out properly with our existing R environment.
I will try give it a go by the end of the week and let you know how it goes. The test I sent was showing internal frames with “vsc.showInternalFrames” but I hadn’t kept source files on installation, which is the likely cause of the issue.
I’ll give it a go and then close the issue 👍
Many Thanks,
Wenzel
From: Manuel Hentschel ***@***.***>
Sent: Friday, June 7, 2024 6:04 PM
To: ManuelHentschel/VSCode-R-Debugger ***@***.***>
Cc: Kinsky Wenzel 1200 EAM ***@***.***>; Author ***@***.***>
Subject: Re: [ManuelHentschel/VSCode-R-Debugger] How to see current execution line lower in stack (Issue #185)
The expected/intended behavior for this is the following:
* In the top left corner you have the variables pane, showing the variables in the current frame. You can expand some of these to get more info (e.g. list entries)
* In the bottom left corner you see the call stack. Clicking on a frame makes this the "active" frame. Now, the corresponding line of code is highlighted (if it is in a known file), the variables pane shows the variables from this frame, and anything entered in the debug console will be evaluated in this frame
* I am not familiar with recover(), but from what I have read it should not be necessary when using the debug extension, and will most likely cause errors.
To debug package code, it is recommended to use the debug config entry loadPackages, assuming that the working directory is the root of the package. Otherwise, debuggedPackages should also work, if you installed the package from source and set --with-keep.source.
Note that the debugger tries to hide stack frames belonging to its own function calls. If you suspect that some of your own frames are hidden, you can chekc by setting the R option "vsc.showInternalFrames" = TRUE (and please report if you find such an instance).
If this is not the behavior you get, please post a reproducible example, so I can have a look!
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/ManuelHentschel/VSCode-R-Debugger/issues/185*issuecomment-2155125447__;Iw!!OMGRPR5eiCE28w!uK9LQAXPF_XEBSKGg9CX0LQoIs_MLbQh8zaYQkXHXV0eJEl9sy8HvIlhTEkdU_s-ZFeToZkD_f4kPLb5DwOcLiSYexA1jvM$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/BEBASG5ASCOQONUSSTDAR5DZGHKVLAVCNFSM6AAAAABIYDE5HSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJVGEZDKNBUG4__;!!OMGRPR5eiCE28w!uK9LQAXPF_XEBSKGg9CX0LQoIs_MLbQh8zaYQkXHXV0eJEl9sy8HvIlhTEkdU_s-ZFeToZkD_f4kPLb5DwOcLiSYU18FX-E$>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
|
Can't see current execution line when stepping into functions
I am currently trying to migrate from RStudio to VS Code and would like to know whether it is possible to have a seamless execution trace when debugging custom functions. I can see the different environments / stack layers under the call stack. But I can't call variables from the current environment in the debug console and the code of the function being executed.
Currently executed line is somewhere within function backtestsLS. If I use recover() to step into the correct frame all completions and variables dissapear.
What I would ideally have is that on step in I can see the currently executed line within the function and possibly set breakpoints within the function code.
Current debug config (launch.json) is;
I also attempted via debug file and attach to session with similar results. This is using R 4.2.3 with vscDebugger version 0.5.2.
Session Info
R version 4.2.3 Patched (2023-04-13 r84428 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)
Would be great to know if I need to change something in the config or R Settings to get this working better.
The text was updated successfully, but these errors were encountered: