-
Notifications
You must be signed in to change notification settings - Fork 138
Debugger attaches too late to JavaScript function with "RunOnStartup" option #1492
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
Comments
Workaround: Remove the |
Could be related to #1245 and Azure/azure-functions-host#4384 |
@EricJizbaMSFT Is there anything I should check or try that could help supporting (or falsifying) this assumption? |
@heinrich-ulbricht the debugger knows when to attach based on the problem matcher in your
to something like this:
You'll want to check the logs for the "func host start" task and modify the We're currently looking for the "Host lock leased" line, which might be printed after the first timer trigger is run. |
Ok will try after returning from vacation. |
I got the debugger to attach early to my
My
I copied the |
Use case:
Debug Azure Function locally by pressing F5 and have the function run immediately with breakpoints being set.
Expected result:
Set breakpoints are hit.
Observed result:
Breakpoints are not hit. The message "Debugger attached" appears after completing the first function execution.
Repro steps:
"runOnStartup": true
to function.jsonClick to expand console output:
The function is run before the debugger is being attached. In the log you see
[9/15/19 9:18:14 PM] Trigger Details: UnscheduledInvocationReason: RunOnStartup
before
[9/15/19 9:18:27 PM] Debugger attached.
I added some initial delay to my function to rule out race conditions. But it seems like the initial function execution is being waited for before attaching the debugger.
Context info:
OS: linux (Debian 9)
Product: Visual Studio Code - Insiders
Product Version: 1.39.0-insider
Language: en
Node.js: v10.16.3
The text was updated successfully, but these errors were encountered: