Skip to content

Unsaved file - single file - debug #19415

Closed

Description

  • 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

Activity

  1. bpasero commented on Jan 26, 2017

    @bpasero
    Contributor

    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.

  2. added
    debug
    on Jan 26, 2017
  3. isidorn commented on Feb 1, 2017

    @isidorn

    Benjamin Pasero (@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

  4. bpasero commented on Feb 1, 2017

    @bpasero
    Contributor

    Isidor Nikolic (@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?

  5. added
    verification-needed
    feature-request
    on Feb 1, 2017
  6. isidorn commented on Feb 1, 2017

    @isidorn

    Benjamin Pasero (@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

  7. bpasero commented on Feb 1, 2017

    @bpasero
    Contributor

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

  8. isidorn commented on Mar 8, 2017

    @isidorn

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

  9. removed
    verified
    on Mar 8, 2017
  10. locked and limited conversation to collaborators on Nov 18, 2017
  11. added a commit that references this issue on Sep 6, 2026
    d6f435a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

debugfeature-request

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions