Trouble debugging ASP.NET site: loading debugger times out - asp.net

Intermittently, my team's (overweight) VS2010 solution fails to load in the debugger. We get informed that "The web server did not respond in a timely manner".
Workarounds for when this happens:
Build, then debug (but not hitting F5 before building)
IIS Reset
Killing other apps, or closing extra open tabs in my other browser (debugging in IE, browsing stuff/keeping Gmail open in Opera)
Is there a registry key we could set that would make the response timeout longer, or similar?

I've found the hint of an answer here:
There are registry keys that control timeouts for VS's debugger. As these are generally not documented, it's a matter of trial and error from here.
So far I've been toying with HKCU\Software\Microsoft\VisualStudio\(version number)\Debugger\ScriptDocsTimeout

Related

Visual Studio 2019 Debugger only runs once, requires restart to run again

I'm building a .net core react app. When starting the application in debug mode, I have no problems the first time I run, but if I stop debugging and attempt to run again, visual studio will stop debugging on its own as the web page is loading.
If I restart my computer, I can debug again, but if I stop and start, I experience the same issue. Restarting Visual Studio works occasionally, but it seems like I need to close out all instances of it, wait a few seconds, relaunch, wait for a few seconds after everything finishes loading, and then it will work (again, only once).
I'm assuming there's a process that isn't shutting down properly and is blocking the debugger from fully starting but I can't seem to find it. I am also running visual studio as Admin. Any help would be appreciated.
Ok so it's not a complete answer but I found what seems to be causing the issue. When the debug would fail, the URL briefly changed, showing that chrome was attempting to use the legacy browser support extension. After a bit of googling I learned that this could be caused by enabling "Javascript Debugging for ASP.NET" under Tools>Options>Debugging>General. Disabling this checkbox allows me to run debug without any issues.
Since I don't really care about the javascript debugging, this is a suitable enough answer for me, but if anyone else sees this and knows the answer that would keep javascript debugging enabled, please provide the details in case anyone needs it in the future.

ASP.NET Webpage never loading - debug from VS (2015, 2017)

I have a very strange problem I'm fighting with since VS 2015 (maybe even 2013).
Now I'm working with VS 2017 and it still occurs.
Here is the situation.
I have a legacy web application (Webforms, later enhanced by integrating webapi REST with javascript/html client code, some WCF endpoints, etc).
I build and start debug session from within VS (I do debug/testing mostly with Chrome and FF, rarely with IE/Edge/etc.), and I use IIS Express.
Most of the time the application debug session starts just fine - the page loads in browser and I can either debug server side in VS / client side in browser's debug tools.
But sometimes, the page actually never completes loading, and no matter how long I wait, it just stays locked on "loading..." message.
The only solutions I found are:
- either restart PC
- or (in Chrome), start browser in new identity.
- switch to a different browser (e.g. after starting with Chrome, open page in FF - or vice-versa).
When the page loads normally, the VS's Output Debug window displays various tracing / debug messages or progress of loading various dlls.
However, as soon as the problem described above starts to happen, the VS Output Debug starts to log msgs like
The thread <#nnnn> has exited with code 0 (0x0).
When this starts to happen, no matter what I do (except starting browser in new identity / change browser / restarting PC) I can no longer debug.
No matter if I totally close and restart the browser, clear cache, close and restart VS / IIS. Nothing helps.
The situation mentioned above occurs at very random intervals.
Sometimes I can work and debug for days (I suspend / hibernate the PC at the end of the day, resume next days, end everything works ok).
However other times the issue occur after just starting few debug sessions, and on occasions, even after a full shutdown / restart, at very first debug session, this happens.
I have lived with it for long time, but sometimes is very annoying.
Anyone have experienced a similar issue?
Any idea what is causing it, and is there is any fix / workaround?
Thank you
The messages in your output log reporting:
The thread <#nnnn> has exited with code 0 (0x0)
Just indicates that the thread has exited safely and is very normal to see this in correctly working code. In fact it would be abnormal to not see this as you will end up using all available threads.
From what you have explained I would suggest that you need to look at the extensions you have installed in your browsers. I typically will use a vanilla profile (blank profile with no modifications / extensions) so that my debugging is not affected by any modifications the extensions can make.
I would also monitor your system's CPU and memory usage. Are either of these being maxed out?

Visual Studio 2017 release 15.7.3 does not launch application successfully

I have a fairly standard web application with a single HELLO WORLD aspx test page, so for the purposes of this question, that is the start page.
When I run the app from visual studio by pressing f5 I get "Cannot reach this page" or whatever the 404 equivalent is in each browser. (chrome: "this site can't be reached"). In firefox, the page runs successfully first time, firefox doesn't have any debugger attachment add ins, so the problem seems to relate to debugger attachment in IIS express
If I wait a few seconds, and then F5 the browser (IE or chrome), the expected page loads successfully, so it seems to be a delay in IIS starting when a debugger is attached.
I'm wondering if anyone else has hit this and whether they have a solution. We have a quite a few tweaks in web.config to meet high security needs but otherwise I can't think why it would go wrong.
Workaround is to wait a few seconds and press f5, but thats kind of annoying when you're trying to get on with things.
As described by O.H., and verified by user2728841, the solution for me was:
Tools > Options > Debugging and changing "Enable JavaScript debugging for ASP.NET".
However, opposite to O.H. and like user2728841, my option was deselected, and selecting it solved the problem.

Browsers don't load page server by IIS Express while developing

I have a very odd problem with Chrome and FF browsers, when I'm using them while developing asp.net applications in VS 2013 / 2015, with IIS Express
Precisely, after few debug sessions (edit / run), the browsers no longer load the page (the site). The page keeps trying to load, the spin indicator is keep loading, if I monitor in VS in Output I see the app seems to work (I see regula messages, like
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-131087453511178120): Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\vs\70993733\b377d6be\App_Web_tzrs4sq3.dll'
but the page never loads.
Even if I totally restart the browser and all its instances (from task manager), exit VS, kill IIS Express, nothing gets solved.
If for example this starts to happen in Chrome, and I try to load the same page in FF, it works. But after few more debug sessions (edit / run), FF starts behaving the same.
This happens erratically (sometimes I can debug a full day, tens of session, without problem), and sometime it happens just after 2-3 sessions.
Any other page (form internet) loaded in that browser still works just fine. Somehow it seems the browser cannot get back data from local IIS Express.
The only solution I found so far was to restart PC - after that, the debug session works, but also, till some moment.
I cannot tell if this happens in IE or Edge also, because it never happen to me with them, but I'm using them rarely (because I'm more accustomed with Chrome and FF's web developer tools - source, console, etc).
Did anyone encountered this behavior?
Any solution, or advice?
Correction:
Only Chrome still fails to load page even after restart and closing all instances in Task Manager.
FF (at least in latest version) seems to recover after a close / kill in Task Manager
Thank you

trying to find cause of Flex "RPC Error" pop-up

I'm working with a Flex 4 application (MXML and ActionScript front-end using BlazeDS and Java back-end) and I am trying to find the origin of an error.
The user sometimes (maybe once a week) gets a pop-up window with "RPC Error" in their web browser. If they retry the operation, they get the same error. Restarting the browser or maybe just reloading the page makes the error go away. Looking in the server log, I don't see any error on the server side. How can I figure out the cause of the RPC error? Can I configure some setting in the browser or Flash player to get additional info?
Thanks for any ideas. I've searched the web & some forums including SO but I've come up empty-handed.
Edit: in this case it appears the problem was loss of the network connection (user was connected via cell modem). I'm still interested in any ideas about how to troubleshoot this problem.
I like to do my development in Firefox and using Firebug as a console. When the Flex app starts, open up Firebug and look at the Net tab. It will bring up all the RPC calls made while Flex is initializing, which can be very useful for these kinds of bugs.

Resources