Skip to content

executeCommand don't follow promise ordering to execute #132446

Closed

Description

@taikulawo

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version:

Version: 1.60.0 (Universal)
Commit: e7d7e9a
Date: 2021-09-01T10:54:53.442Z
Electron: 13.1.8
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Darwin x64 20.6.0

  • OS Version:
    MacOS big sur 11.5.2

Steps to Reproduce:

  1. install https://marketplace.visualstudio.com/items?itemName=ctf0.macros

use this settings

"macros.list": {
        "restart": [
            "workbench.action.debug.stop",
            {
                "command": "$delay",
                "args": {
                  "delay": 100
                }
              },
            "workbench.action.debug.start",
        ]
    },
  1. use follow shortcut
    {
        "key": "f4",
        "command": "macros.restart",
        "when": "inDebugMode"
    },
  1. open any project, press f4 to debug. There should hit confirm restart dialog
  2. change 2 delay to 500
"macros.list": {
        "restart": [
            "workbench.action.debug.stop",
            {
                "command": "$delay",
                "args": {
                  "delay": 500
                }
              },
            "workbench.action.debug.start",
        ]
    },
  1. press f4, there aren't confirm restart dialog showing

there are same question.
#10534

Activity

  1. added
    debug
    on Sep 7, 2021
  2. added
    under-discussion
    on Oct 11, 2021
  3. taikulawo commented on Nov 15, 2021

    @taikulawo
    Author

    Andre Weinand (@weinand) Does this issue has some result? 😃

  4. weinand commented on Nov 15, 2021

    @weinand
    Contributor

    @iamwwc what is the exact reason that you cannot use "Restart" to do the "Stop"/"Start" sequence?

  5. taikulawo commented on Nov 15, 2021

    @taikulawo
    Author

    @iamwwc what is the exact reason that you cannot use "Restart" to do the "Stop"/"Start" sequence?

    "Restart" in Rust will use previous binary. But I have changed my codes already, so I want to stop first, then start again, extension(lldb) will first recompile my codes.

  6. taikulawo commented on Nov 15, 2021

    @taikulawo
    Author

    It's important for Non-interpreter language. Javascript's "Restart" will re-interpreter codes, so it will always use latest codes. But in others, possibly not

  7. taikulawo commented on Nov 15, 2021

    @taikulawo
    Author

    Currently I'm using https://marketplace.visualstudio.com/items?itemName=geddski.macros, executing workbench.action.debug.stop, workbench.action.debug.start sequentially. But

    settings.json

        "macros": {
            "restart": [
                "workbench.action.debug.stop",
                "workbench.action.debug.start"
            ]
        },

    shortcuts

        {
            "key": "f4",
            "command": "macros.restart",
            "when": "inDebugMode"
        },

    But after pressed F4, 'xxxxx' is already running. Do you want to start another instance? dialog showed. I guess stoped state from one process don't sync to another process. It I delay some second, there no dialog showing.

    Please see this #10534 (comment)

    if i deliberately delays the workbench.action.files.save using a setTimeout this works

  8. taikulawo commented on Nov 15, 2021

    @taikulawo
    Author

    Andre Weinand (@weinand) In clion(a jetbrains rust IDE), there are option showing that we can disable dialog forever.

    After clicking stop and rerun, recompile is the first step.

    image

  9. taikulawo commented on Nov 16, 2021

    @taikulawo
    Author

    Andre Weinand (@weinand) Does have any progress?

  10. taikulawo commented on Nov 19, 2021

    @taikulawo
    Author

    Andre Weinand (@weinand) 😃 Does have some result?

  11. roblourens commented on Oct 19, 2022

    @roblourens
    Member

    There is an await missing here:

    But I'm not sure whether that's enough to fix this issue. Would take a PR for it if someone else has the time to debug and investigate.

  12. added
    help wanted
    on Oct 19, 2022
  13. 4 remaining items

  14. added a commit that references this issue on Dec 15, 2022
    b44ce92
  15. added a commit that references this issue on Dec 15, 2022
    9a1c4d9
  16. added
    unreleased
    insiders-released
    and removed
    unreleased
    on Dec 15, 2022
  17. taikulawo commented on Jan 14, 2023

    @taikulawo
    Author

    roblourens I can still reproduce this bug in insider

    Version: 1.75.0-insider (user setup)
    Commit: 243854703b7fa371abb752ec0df7817a615a308b
    Date: 2023-01-13T07:48:05.934Z
    Electron: 19.1.9
    Chromium: 102.0.5005.194
    Node.js: 16.14.2
    V8: 10.2.154.23-electron.0
    OS: Windows_NT x64 10.0.22621
    Sandboxed: Yes
    
  18. roblourens commented on Jan 17, 2023

    @roblourens
    Member

    Works fine for me, debugging in node, even with no delay. If you still see it, it could be an issue on the debug adapter's end? What are you debugging? Consider filing an issue on the debug extension.

  19. taikulawo commented on Jan 25, 2023

    @taikulawo
    Author

    For nodejs, If we have the prebuild task take 10s to finished in tasks.json. Before vscode's toolbar become to yellow(maybe It's BeforeDebuggerSessionStart phase), press F4 will cause confirm restart dialog showing up

  20. roblourens commented on Jan 25, 2023

    @roblourens
    Member

    Ok but that will be sort of a different issue, if you open another issue I can take a look.

  21. taikulawo commented on Jan 25, 2023

    @taikulawo
    Author
  22. locked and limited conversation to collaborators on Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugdebughelp wantedinsiders-releasedverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions