Skip to content

Failed to debug second time if using Azurite #1245

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

Closed
ejizba opened this issue Apr 30, 2019 · 6 comments
Closed

Failed to debug second time if using Azurite #1245

ejizba opened this issue Apr 30, 2019 · 6 comments
Labels
Milestone

Comments

@ejizba
Copy link
Contributor

ejizba commented Apr 30, 2019

Repro steps:

  1. Create a javascript project
  2. Add a timer trigger
  3. Set AzureWebJobsStorage to UseDevelopmentStorage=true
  4. Make sure azurite is running (https://github.com/Azure/Azurite/blob/master/README.md#installation-and-usage)
  5. Debug
  6. Detach
  7. Debug again

Expected:
It attaches

Actual:
It never attaches because the following is never printed:

Host lock lease acquired by instance ID '000000000000000000000000D21F4D53'.

@ejizba
Copy link
Contributor Author

ejizba commented Apr 30, 2019

Azure/Azurite#37

@JustinGrote
Copy link

JustinGrote commented May 3, 2019

This happens if you use any remote storage in my observation, it never hits the lease request message so it never backgrounds. To fix, the problemMatcher for the task should match on the Job host starting, not on the lease request.

[5/3/2019 1:02:23 AM] Host initialized (632ms)
[5/3/2019 1:02:23 AM] Host started (644ms)
[5/3/2019 1:02:23 AM] Job host started

EDIT:

For a temporary fix, change your tasks.json for func start to this to override the background job matching lines. Worked for the powershell worker at least.

        {
            "type": "func",
            "command": "host start",
            "problemMatcher": {
                "base": "$func-watch",
                "background": {
                    "activeOnStart": true,
                    "beginsPattern": "^Azure Functions Core Tools|Restarting host$",
                    "endsPattern": "Job host start"
                }
            },
            "isBackground": true,
            "presentation": {
                "group": "azfunc"
            }
        }

@ejizba
Copy link
Contributor Author

ejizba commented May 3, 2019

@JustinGrote we used to do that, but it doesn't work in all cases. See #660

Azurite specifically does not work as described in the above issue. If you're not seeing Host lock lease acquired by instance ID in a remote case, please file a separate issue with repro steps, project language, etc. and we can look into it.

@ejizba
Copy link
Contributor Author

ejizba commented May 3, 2019

Seems like both messages (Job host start and Host lock lease acquired) are not ideal, so I filed an issue on the func cli: Azure/azure-functions-host#4384

@JustinGrote
Copy link

JustinGrote commented May 3, 2019 via email

@ejizba
Copy link
Contributor Author

ejizba commented Nov 15, 2019

I tried the latest version of Azurite and this seems to be working now

@ejizba ejizba closed this as completed Nov 15, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants