I've pushed my .Net6 web app (Angular front end) to Azure and I can connect to the url and see and run the website.
Question - I want to know if there is a way to test the instance running in Azure and set a breakpoint on one of my controllers and debug it? Is this possible from VS Code? If so how would I do it and is there a link somewhere with a tutorial to get me started?
FYI - I currently have the Azure extension installed in VS Code. I used it to push/publish the app to Azure. I can see when I right click on the app service there is a option called "start remote debugging". I clicked it, but VS shows a error message in the bottom left corner saying "Azure Remote Debugging is currently only supported for Node.js apps on Linux." I'm not using Linux. I believe my server running the app is a Win server and I because it's a .Net 6 app, it's using .Net on the server side, not Node.
It seems like this is what I want but it's for Visual Studio, not Visual Studio Code.
CodePudding user response:
I want to know if there is a way to test the instance running in Azure and set a breakpoint on one of my controllers and debug it? Is this possible from VS Code? If so how would I do it and is there a link somewhere with a tutorial to get me started
As Per the visual studio code documentation currently, vscode supports remote debugging only Node.js applications. It doesn't support remote debugging: this is a feature of the debug extension.
If you want to debug a .Net 6 app, we suggest you to use Visual studio instead of visual studio code.
You can refer to this documentation for more information about Remote debug ASP.net core on Azure or this SO thread
I've also set the 'Remote Debugging' to 'On' in the configuration section of the app service. But it only shows a Visual Studio version, nothing for VS Code. Does this mean no go for VS Code?
Yes, Currently remote debugging is supported in Visual studio only.