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

Unsaved file - single file - debug #19415

Closed
seanmcbreen opened this issue Jan 26, 2017 · 6 comments
Closed

Unsaved file - single file - debug #19415

seanmcbreen opened this issue Jan 26, 2017 · 6 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality
Milestone

Comments

@seanmcbreen
Copy link

  • VSCode Version: Code - Insiders 1.9.0-insider (4265f5e, 2017-01-24T10:29:13.076Z)
  • OS Version: Darwin x64 16.3.0

Steps to Reproduce:

  1. Open code on a new file e.g. code-insiders foo.js
  2. Importantly this is s a non-saved file i.e. a new file
  3. Add code (I have a snippet)
  4. F5 you get an error - I expected single file debug
@bpasero
Copy link
Member

bpasero commented Jan 26, 2017

If the file does not exist on disk it is an untitled:// file in our system. Since it has an associated path, it is save to save it without user interaction (we just take the path the user wanted). Not sure about having an untitled file open without associated path (saving here would trigger a dialog).

In both cases, it is an interesting scenario to allow to debug from an untitled file.

@weinand weinand assigned weinand and isidorn and unassigned weinand Jan 26, 2017
@weinand weinand added the debug Debug viewlet, configurations, breakpoints, adapter issues label Jan 26, 2017
@isidorn isidorn added this to the February 2017 milestone Jan 26, 2017
@isidorn
Copy link
Contributor

isidorn commented Feb 1, 2017

@bpasero so I can easily change the textFileService to saveAll including untitled files here
However this uncovers some weird issue in the workbench. Namely follow Sean's steps and after the change to save all untitled files now debugging nicely starts but the workbench hides the file and it can not be seen anywhere.

Gif attached, no errors in console, notice how the program is successfully ran in the debug console
heyben

@bpasero
Copy link
Member

bpasero commented Feb 1, 2017

@isidorn maybe better to not save all but just the current active file? what about executing the command workbench.action.files.save and then starting debug?

@isidorn isidorn added verification-needed Verification of issue is requested feature-request Request for new features or functionality labels Feb 1, 2017
@isidorn
Copy link
Contributor

isidorn commented Feb 1, 2017

@bpasero executing 'workbench.action.files.save ' did the trick.
However in the untitiled file the save dialog appears and no debug is started, this is because the promise probably does not nicely flow from the save dialog. Though the experience is still fine, when the user hits f5 for the second time he starts debugging.

Sean's use case works perfectly now

@isidorn isidorn closed this as completed in f6c19a7 Feb 1, 2017
@bpasero
Copy link
Member

bpasero commented Feb 1, 2017

Yeah, its a bit fragile. Let's see how it goes and wait for bugs.

@isidorn
Copy link
Contributor

isidorn commented Mar 8, 2017

After discussions we have decided to revert this behavior since it introduced some unexpected consequences - as seen by the issues linked

@isidorn isidorn reopened this Mar 8, 2017
@isidorn isidorn removed the verified Verification succeeded label Mar 8, 2017
@isidorn isidorn modified the milestones: Backlog, February 2017 Mar 8, 2017
@isidorn isidorn removed in-releasenotes verification-needed Verification of issue is requested labels Mar 8, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

4 participants