azure-functions-host
azure-functions-host copied to clipboard
Remote debugging of Node.JS/JavaScript Function Apps via Cloud Explorer
It looks to be possible to debug C#-based Function Apps via Visual Studio 2019. However, I've been unable to do this for Node.JS/JavaScript based Function Apps.
I can connect a Remote Debug session via Cloud Explorer without an issue, but any breakpoints I set are ignored. VS 2019 says 'The breakpoint will not currently be hit. No symbols have been loaded for this document.'
I've updated Symbols via Debug > Options > Debugging > Symbols > 'Load all symbols'. But I suspect this won't help.
The Function App may have been deployed via the Azure Portal, or through VS 2019, or Visual Studio Code, so when implementing this improvement, it should work with whatever deployment method was used. It should also hopefully not matter what platform the Function App has been set to run on (Windows or Linux).
@ColbyTresness - do you have any ideas on this? Based off of your closing of this issue: https://github.com/Azure/Azure-Functions/issues/393
+@pragnagopa as well who has done work to enable remote debugging.
So I know that remote debugging won't work for at least linux consumption, but I'm not sure why this wouldn't be working with windows, since it should be hitting the same Kudu APIs as C#, right?
We've definitely not tested the VS w/ JS scenario though, since we primarily target .NET for our VS experience (and push JS folks to VS Code). So it could just be that this issue is on the VS side, but I'm not sure how pressing this is to fix, given that very few people are using JS with VS. @vijayrkn can you think of a reason why the remote debugging experience for windows function apps in VS wouldn't work for javascript functions? Or is this on our side?
We might not be attaching to the right remote process in this case. Do you know if it works if the user manually picks the process and manually attaches to the remote process?
Adding @phil-allen-msft
Platform updates are needed to enable remote debugging for node function apps for both consumption and dedicated. As of now we do not have planned work items to enable this feature.
We might not be attaching to the right remote process in this case. Do you know if it works if the user manually picks the process and manually attaches to the remote process?
It doesn't work, no. I connected directly to the process (w3wp.exe) as well as having it auto-detect it. Here's a screenshot from when I was doing this back in December... (thank goodness for TimeSnapper screenshotting my desktop every 6 sec).
Platform updates are needed to enable remote debugging for node function apps for both consumption and dedicated. As of now we do not have planned work items to enable this feature.
@pragnagopa Wow, that isn't obvious by looking at any of the documentation. I spent hours trying to get that to work, thinking it was something I was doing wrong. If it isn't possible, do you think the 'Remote Debug' option in Azure should say that it doesn't work for Node.JS-based Function Apps.. at least then we'd know.
Are most people writing Function Apps in C# ? Just wondering what the percentage split is between the different languages & what people are using.
The language options presented in Azure make it look like a level playing field, but it's looking more uneven, with some languages having more support/features available to them than others. Is that documented?
@e14mattc - Thank you for the feedback. I have opened tracking items referenced above to improve UI and documentation.
@e14mattc The architecture of Azure functions means that dotnet core languages (including c#) are "native", and all the others are "workers" that effectively run on c# and communicate back via gRPC, so that's why c# generally appears more feature-rich. The rest of the languages excluding .NET Core ones (JS, Python, Powershell, etc.) are pretty much on a level playing field depending on the quality of the worker implementation.
https://azure.microsoft.com/en-us/blog/introducing-azure-functions-2-0/
Having the ability to remote debug Node.js Function Apps would be incredibly helpful.