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

R debugger: starting debugger prompts file saving #1728

Open
EmilHvitfeldt opened this issue Oct 31, 2023 · 2 comments
Open

R debugger: starting debugger prompts file saving #1728

EmilHvitfeldt opened this issue Oct 31, 2023 · 2 comments
Labels
area: debugger Issues related to Debugging bug Something isn't working lang: r

Comments

@EmilHvitfeldt
Copy link

Positron Version:

Positron Version: 2023.10.0 (Universal) build 1453
Code - OSS Version: 1.83.0
Commit: b781e9e
Date: 2023-10-30T03:03:08.650Z
Electron: 25.8.4
ElectronBuildId: undefined
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Darwin arm64 22.6.0

Steps to reproduce the issue:

  1. make debugger happen in unsaved file.

I ran

debugonce(lm)

lm(mpg ~ disp, data = mtcars)
Kapture.2023-10-30.at.21.33.51.mp4

What did you expect to happen?

For this prompt not to happen

Were there any error messages in the output or Developer Tools console?

Nope

@DavisVaughan
Copy link
Contributor

DavisVaughan commented Oct 31, 2023

I'm not sure if this is a good or bad thing tbh!

On one hand, being in a debugger state is inherently a little unstable regardless of what language you do it in, so encouraging a saved file seems reasonable.

On the other hand, I often want to quickly debug something in vctrs so I'll open a new scratch file, type in some code that i know will trigger the issue, run debugonce(fn) in the console, then run that code in the scratch file, and saving seems like overkill there


I think I convinced myself we should look into avoiding this save prompt, because of how often I do the "quick debug" in a scratch file

@lionel- lionel- added this to the Release Candidate milestone Feb 26, 2024
@wesm wesm added lang: r bug Something isn't working labels Feb 29, 2024
@DavisVaughan
Copy link
Contributor

See microsoft/vscode#77023 where Debug: Save Before Start is mentioned as an option to control this, I think that should help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: debugger Issues related to Debugging bug Something isn't working lang: r
Projects
None yet
Development

No branches or pull requests

4 participants