Skip to content
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

Unable to set break point #14682

Open
gunawebs opened this issue May 9, 2024 · 9 comments
Open

Unable to set break point #14682

gunawebs opened this issue May 9, 2024 · 9 comments

Comments

@gunawebs
Copy link

gunawebs commented May 9, 2024

System details

RStudio Edition :Desktop
RStudio Version : 2024.04.0+735 (2024.04.0+735) 
OS Version      : 14.4.1 (23E224)
R Version       : R version 4.3.3 (2024-02-29) -- "Angel Food Cake"

Steps to reproduce the problem

Create any R code file with a function
Source the file
Add a breakpoint

Describe the problem in detail

Despite Sourcing the file, breakpoint is NOT placed
Just says "Breakpoints will be activated When this file is sourced"
But the file has ALREADY been sourced.
THIS issue wasn't there before I upgraded the rstudio to the latest version

image

Describe the behavior you expected

Expected Behaviour: Breakpoint will be placed

  • [x ] I have read the guide for submitting good bug reports.
  • [ x] I have installed the latest version of RStudio, and confirmed that the issue still persists.
  • [ x] If I am reporting an RStudio crash, I have included a diagnostics report.
  • [ x] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
@gunawebs gunawebs added bug new New incoming issues, ready for initial review. labels May 9, 2024
@gunawebs
Copy link
Author

gunawebs commented May 9, 2024

IMPORTANT: please note that I have now deleted this version, and installed the earlier version:

Version 2023.12.1+402 (2023.12.1+402)

And breakpoints work JUST FINE

@ronblum
Copy link
Contributor

ronblum commented May 9, 2024

@gunawebs Thank you for raising this! I'm unable to reproduce the issue on either MacOS 14 or Windows 11. Can you please provide a minimal code example that results in the problem?

@ronblum ronblum added debugging info needed Additional information requested—reprex, steps, open question, etc. and removed new New incoming issues, ready for initial review. labels May 9, 2024
@gunawebs
Copy link
Author

@ronblum As shared in screenshot above. I was just not able to set breakpoint, in a sourced file.
And once I installed the prior version, it worked just fine.

@ronblum
Copy link
Contributor

ronblum commented May 10, 2024

@gunawebs I can't reproduce the problem based on the screenshot because part of the code is cut off on the right, it uses objects there were defined elsewhere, and there are at least 219 lines that aren't included.

Does this occur with any sourced file? For example, is it possible to set a breakpoint in the following code?

x <- 1
y <- 23
x + y

@sthawinke
Copy link

sthawinke commented May 13, 2024

I encountered the same only in this latest rstudio version, you have to manually resource the function before the breakpoint is set, an any file.

platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 4
minor 4.0
year 2024
month 04
day 24
svn rev 86474
language R
version.string R version 4.4.0 (2024-04-24)
nickname Puppy Cup

Rstudio:

$version
[1] ‘2024.4.0.735’

$long_version
[1] "2024.04.0+735"

$release_name
[1] "Chocolate Cosmos"

@gunawebs
Copy link
Author

@ronblum Yes, the issue is with all files. PLs see above comment from @sthawinke Too!

@ronblum ronblum added evaluate effort 🕐🗳🔎 and removed info needed Additional information requested—reprex, steps, open question, etc. labels May 13, 2024
@ronblum ronblum added this to the Cranberry Hibiscus milestone May 13, 2024
@ronblum
Copy link
Contributor

ronblum commented May 14, 2024

@sthawinke Can you provide a simple reproducible example? And can you check whether this will cause the problem? I'm trying to find a simple example that I can use to reproduce, because I'm unable to so far. Also, does the problem occur even with this simple example?

x <- 1
y <- 23
x + y

@sthawinke
Copy link

Screenshot from 2024-05-14 14-51-13
I defined this simple function and just clicked in the margin to set a breakpoint. It is not active until I source again. This is not necessarily a bug, but a bit tedious and unlike previous Rstudio versions

@ronblum
Copy link
Contributor

ronblum commented May 14, 2024

Thanks! I can reproduce the problem in 2023.03.2+454, 2023.12.1+402, and 2024.07.0-daily+131. So this has always been a requirement. Note this only affects the function; when adding something outside of the function like

a <- 8
a

the breakpoints will work. This is by design, and only the newly defined functions that are affected. We'll look into whether changing this is doable.

@ronblum ronblum closed this as completed May 14, 2024
@ronblum ronblum reopened this May 14, 2024
@ronblum ronblum changed the title Unable to set break point: From Rstudio version: 2024.04.0+735 (2024.04.0+735) Unable to set break point May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants