Visual Studio 2017 Remote Debugger not hitting breakpoints - asp.net

I have recently deployed my ASP.NET Core application to my IIS8 server. However due to some issues, I have to remotely debug it.
I installed the Remote Debugger and managed to connect to the server and Attach a process.
However, I am unsure of what to attach from there. I have tried attaching all dotnet.exe and w3wp.exe processes but each time I do that, my breakpoint turns white and says that it won't hit.
I took a look at my Modules tab and for some reason, my symbols aren't loaded for my application dlls. I have made sure that the configuration is Debug and that the ASPNETCORE_ENVIRONMENT is Development.
Currently this is what I am doing:
Run the Remote debugger on the IIS server
Run the website on my local laptop
Attach a process in Visual Studio

Related

How to make ASP.Net run in Managed (v4.0.30319), x86 mode to enable remote debugging

I'm trying to debug some code running on a server using the Visual Studio 2015 Remote Debugger. I can get connected and view all the running processes but when I try to connect to the w3wp.exe process it is having none of it.
From my fiddling I've noticed that it will connect to apps that are running in the Managed (v4.0.30319), x86 mode, however if it's just x86 it doesn't connect and I'm guessing this is because it's been compiled and isn't in MSIL.
I've copied over the files from my machine, by passing all the precompilation that we were doing, as much config set to debug as I can find and even still when I try to attach it still reports x86 with no mention of any managed code.
Just to clarify, this is what I see when attaching on my local machine:
And this is the same app running on the remote server:
Does anyone know how to force the server to run in managed mode, or is there another reason I can't connect to the remove debugger?
Thanks

ASP.Net local debug on a Windows Server 2008 R2 Terminal Services Server

We have a Windows Server 2008 R2 box setup as a Terminal Server with Visual Studio 2012 installed on it for remote developers to be able to do development on our ASP.net systems.
We would like to be able to do debugging on out projects the same way we do when developing on our local machines using visual studios internal development server.
I am trying to start local debugging on an ASP.Net project (F5) in VS2012 - the project compiles - IE comes up with my localhost url and then it just spins with "connecting..." and the page never comes up.
Pulling up the same workspace on a local machine and debugging comes up just fine.
I've exhausted my google-fu on looking for solutions here and humbly ask you all for any insight.
Visual Studio works a little differently when you are debugging on a server. You don't really want to use VStudio to play/debug on a web server. You need to use the menu option "Debug", "Attach to process". There will be several processes running, so it might take a few tries to find the right process.
Be careful though. Because your break-points will actually freeze IIS for the entire server. It could be a pretty big inconvenience for everyone who is using IIS at the time.
If you are trying to debug the project from your IIS server, you need to verify if the account has Administrator rights, also if the project has been deployed with its source files, you can attach the process (maybe it is w3wp.exe) in Visual Studio and debug it.
Another way is to open the solution using Visual Studio and change in the web project's property the server: Use Visual Studio Development Server.
Let me know more info about your scenario to provide you more paths.
What I would do is attach to the IIS process on the server: http://msdn.microsoft.com/en-us/library/vstudio/3s68z0b3.aspx you can even do this off your machine.
make sure debug is enabled in web.config for that app and you've mounted the remote project. Add a break point, debug by attaching to the IIS app pool process & it'll trigger the break point.
I was able to Attach Process to the SPUCWorkerProcess.exe even though it's a farm solution and not a sandbox solution

remote debugging problem in Visual Studio

I have local my projects asp.net open in visual studio 2010. And also copy this project to IIS folder in remote hosting. Cause in hosting directory I don't have VS so I copy there remote debugger application. I connect from my Visual Studio to IIS process on hosting, but any of breakpoints not fire.
Why ?
I had the same issue when I connected using the Transport in the "Attach to Process" dialog set to "Remote (native only with no authentication)". I was able to connect to the IIS process (w3wp.exe for IIS6 on Win2K3), but no breakpoints were hit when I navigated within the web app.
To get it working, I changed the Transport to "Default". Then I ran into numerous issues with successfully connecting to the Visual Studio Remote Debugging Monitor. But once I resolved them all and was able to get the list of processes from the remote machine, I could connect to W3WP.exe and voila, my breakpoints started working and I was able to debug normally.
You don't provide much detail on your local and remote configuration, so this just a guess whether it might help.

How do I prevent my ASP.NET application from constantly restarting in my development environment?

I'm using Visual Studio 2010 and working on an ASP.NET 4.0 web application. At the moment, a co-worker and I are tweaking CSS, which means constantly changing and saving CSS files and then refreshing the running page in a web browser.
Every few saves, the application restarts, causing a considerable delay while we wait for the app to start up, log in again, and return to the page we were working on. In an IIS production environment a CSS file wouldn't go through the ASP.NET ISAPI, but apparently when running with VS2010 and the developent web server this doesn't matter... or something.
Is there any way to prevent this from happening? Thanks!
Instead of using the built in web server in Visual Studio (casinni), you can install IIS on your workstation and specify visual studio to use IIS as the development web server that runs your project. I do this for the same reasons. The Casinni server crashes or fails to start pretty regularly for me.
You could also use IIS7 Express. Not only will the server be faster but it will also be more like your production environment. This should help you iron out any issues before you deploy. Its also not hard to get VS to debug a local IIS instance.

Unable to debug ASP.NET Applicatation using VS 2008 on IIS 7 running on Windows 7 x64

I've been trying to debug an existing asp.net web application that requires me to debug against an IIS website.
I've installed the app and can navigate to it on localhost. However, when I start VS 2008 as an Administrator and try to debug it, I get a message "Unable to start debugging on the web server. The IIS worker process for the launched URL is not currently running."
I've looked through some of the help file contents and can't seem to figure out what is going on. Clearly, the IIS worker process IS running, since I can navigate to the site locally without VS open.
My boss has suggested that it might be because my OS is 64 bit. Any ideas?
You must start the IIS worker process for the application pool,
Place a test HTML page in the web application folder. Access to this HTML page to initiate a w3wp.exe process for this application pool.
Attach VS debugger to this process.
Start to access the ASPX pages and do debugging.
Be sure you are using the x64 or x86 debugger respectively depending on how you compiled your app.

Resources