I can debug Javascript in IE10 with VS2010 if I manually attach debugger, can I automate it? - visual-studio-debugging

So I just updated to IE10. When I try to debug my web app's javascript, my breakpoints are all just outlines with a little triangle and say in the tooltip:
The breakpoint will not currently be hit. No symbols have been loaded
for this document.
IE10 is started when I start debugging and it goes to the website like IE9 always did. If, in VS 2010, I go to Debug > Attach to Process... and select the iexplore.exe process, as my javascript executes it will hit and stop at breakpoints like it always would with IE9 and everything is peachy until I kill IE10 and start debugging again.
I've made sure that Javascript Debugging is enabled in IE10 and any "solutions" I find online all say to uninstall/reinstall VS2010/IE10 and see if that helps. I already know that VS2010 is capable of debugging, it's just not attaching the debugger properly. How can I fix this so that debugger attaches properly and will hit breakpoints and exhibit the usual behaviour?

Another StackOverflow Post recommends installing VS2012 (any version) and that should fix your issue when debugging JavaScript in IE10 with VS2010.

This may fix JavaScript debugging issue in IE10:
Close Internet Explorer
Press start and type CMD
Run one of these commands in command prompt
32-bit OS
regsvr32.exe "%ProgramFiles(x86)%\Common Files\Microsoft Shared\VS7Debug\msdbg2.dll"
64-bit OS
regsvr32.exe "%ProgramFiles%\Common Files\Microsoft Shared\VS7Debug\msdbg2.dll"

There is another thread on this issue, as Elijah mentions, and this answer is probably more appropriate there, but that thread is closed to me because I'm a new poster. Corey has already mentioned that he can't install VS2012 at this time, but it may be useful to others.
I experienced this same problem after updating to IE10. I already had VS2010 and VS2012 with Update 1 installed, and none of the recommended fixes (including the msdbg2.dll registration) worked for me. What fixed my problem was to reapply Update 1 for VS2012, choosing the "Repair" option. I can now debug javascript in VS2010 again.

Related

Visual Studio 2019 freezes when instantiating SOAP Webreference

I am expierencing a strange problem with Visual Studio 2019. We ware using SOAP-webreferences in our projects. When I start a project in debug mode, the debugger freezes when the SOAP reference is instantiated. Waiting ~5 minutes helps but this problem strongly impaires the development. When I start the same App without the Visual Studio debugger, everything works fine. The bottom line is that I cannot use the debugger right now.
I already tried to set a breakpoint but nothing happens when the debugger freezes - even in the console.
Visual Studio 2019 freezes when instantiating SOAP Webreference
Please try the following steps:
1) disable any third party vs installed extensions under Extensions-->Manage
Extensions to check whether there is an extension causing that.
2) reset all vs settings under Tools-->Import and Export Settings-->Reset all VS settings
3) clean nuget caches first
then run update-package -reinstall under Tools-->Nuget Package Manager-->Package Manager Console
4) close VS, delete .vs hidden folder under the solution folder, bin and obj folder
5) try to use another port under Project Porperties-->Web-->Porject Url https://localhost:<prot>/ like https://localhost:44307/
6) Or try run devenv /safemode on Developer Command Prompt for VS2019 to start a pure VS and then debug your project to test again.
7) If it does not work, you could create a new winform project in VS2019 and then migrate the old content into the new one to test whether the issue still persists. And if it succeeded, it is a better solution to avoid this issue.
If the error also happens on the new one, please repair vs or update vs.
Besides, if these do not work, please share a small sample with us so that it will help us troubleshoot your issue more quickly.

Unhandled exception in WWAHost in Cordova APP using Angular

I'm currently developing a windows modern app using Foundation for Apps and cordova. The app crashes in many ways during navigation, sometimes even immediately after running it.
The crash is this one
And i can't manage to debug it in any way.
I've tried setting up a window.onerror and a WinJS.Application.onerror catch all function with no results. Apparently the crash happens at a lower level. I've also inspected the event viewer but no info are available.
What happens is apparently similar to this question: How to debug unhandled win32 exception in WinJS Win8 store app which is unfortunately unsolved.
What are my options here?
I had the same issue with Visual Studio 2015, Windows 10 and cordova 5.1.1 when I transfer the project to another dev environment. It only occurs at the Windows-x64 app build configuration for the local machine.
After successful building, the app window launches shortly and after that, the win32 exception like the screenshot from sPoz came up. It was reproducible every time.
I try to repair Visual Studio and also I checked the environment variable from my solution as it is described in this Microsoft Article. But I had no luck.
Nothing helped, but simply open the config.xml file and change the Windows Target Version from "Windows 10" to "Windows 8.1" solved the problem and I could run the app with no error:
After that I can turn back to "Windows 10" and everything is fine. This was reproducable on two dev machines.
I do not exactly know if the moved project was the source of the problem and maybe the rewritten config.xml triggers any rebuild mechanism.
Most likely you are hitting an issue related to DOM Ex WWAHost.exe error on Windows 8.1 (apparently fixed on Win10). There is a workaround that should work for most apps; before you click around and get the WWAHost.exe exception, close the DOM Explorer window. This should enable you to debug by hitting breakpoints, etc. If you need to use DOM Ex against a Windows target, you might need try debugging against a remote device (see Kenneth's suggestion here: Why is Cordova Windows 8 app causing an unhandled win32 exception occurred in wwahost.exe?)
What are you using to develop the app ? The Visual Studio Tools for Apache Cordova ? Or Cordova with CLI ?
If you are using the plugin, you must launch the generated WP project to debug. The debug of WP app is not supported currently with the plugin.
I was getting same error during development of cordova windows tablet application, using Visual Studio Enterprise 2015. So far, I was doing try to close DOM-Explorer and use breakpoints and javascript console. After that, while searching javascript intellisense issues with Visual Studio, I figured out that my problem was fixed. What I did to get rid of this problem is that:
Open Tools > Options
Select Text Editor > Javascript > Intellisense > References
Add following references ( angular.intellisense.js, domWeb.js, domWindows_8.1.js ).
I don't know what are the correct reference files, but with these 3 reference files added, my problem has been solved.

Can't start debugger in VS2012 RC

Configuration:
Windows 7, 64 bit
Microsoft Visual Studio Professional 2012 RC Version 11.0.50522.1
RCREL
Running VS in administrator mode
The VS solution contains a web
application, with target: .NET Framework 4.
When I press F5, the solution builds... and nothing else happens.
Happens with both IIS or the VS Dev Server.
Happens with Platform Target of "Any CPU" or "x86"
If instead, I use the Debug / Attach to Process... menu, after a few seconds, I get:
"Debugger is Busy" - Debugger is performing a remote operation that is taking longer than expected. This dialog stay until I click "Terminate" and confirm it.
Then this dialog appears:
"Microsoft Visual Studio"
"Unable to connect to the Microsoft Visual Studio Remote Debugging Monitor named [COMPUTER NAME]. The network connection to the Visual Studio Remote Debugger has been closed."
After clicking OK, the 'normal' "Attach to Process" window finally shows up. In it, the list of "Available Processes" is empty.
Any suggestions or clues?
The main points that I wonder about:
Why is the list of processes empty? It is not surprising that the debugger does not work if it cannot see any processes.
Why is it trying to do "remote" debugging, when it is just accessing the local computer?
(Cross posted on social.msdn)
I had the same problem in VS 2012 (not the RC, but the final release) using a VS 2010 project. It would build fine, but the debugger would not start. So, I modified the solution file:
Changed "Format Verion 11.00" to "Format Verion 12.00"
And changed "# Visual Studio 2010" to "# Visual Studio 2012"
It's a workaround for now until my company upgrades its projects to VS 2012.
I've got a similar setup and I'd followed all the suggestions here and on Microsoft Connect - none of which worked for me. The only thing that did work was renaming MSVSMON.EXE in the x64 folder to MSVSMON.EXE.OLD and copying in the file from the x86 folder in it's place. I'm not sure if there are any other implications in doing this but it seems to have solved the problem in my case.
I eventually resolved this problem by deleting the msvsmon*.* entries in the \Windows\Prefetch folder. After doing so I could debug normally.
Ultimately, a Repair of the VS2012 resolved this issue for me. I followed the advice found at your social.msdn cross-post without any resolution (Devenv.exe /SafeMode /ResetSettings /ResetSkipPkgs and /Setup). Like you, my solution (VS 2010 SP1) also has a web application (targeting .NET 3.5), and the startup project is set to a winforms app. The ASP.NET development server did not start, nor did the app I was trying to debug.
Note that this issue was also posted to Connect at this link (by you?). If anyone else sees this issue, the Connect folks are requesting running the Microsoft Visual Studio 2012 Feedback Tool to collect data. As I started the Repair process prior to finding the Connect issue, I did not and was not able to provide feedback to MS with logging.
Seen a similar issue when running both Visual Studio 2010 and Visual Studio 2012 at the same time. Closing Visual Studio 2010 allow the debugger to start working in Visual Studio 2012.
I had the same issue - starting debugger just told me what a good job it had made of the build and the decided that that was enough.
I feared the worst, but luckily for me a reboot fixed the problem.
I know that this is therefore a pretty useless post in as far as offering help to anyone suffering with this issue, but I thought it was worth noting the point as it shows a) another person with the same problem so please fix it MS, and b) that sometimes a reboot fixes it so maybe that tells the maintainers something.
If you are opening a VS 2010 project with the new VS 2012 version it's probably your bin and obj folders that are causing the problem,deleting them solved the problem for me.Or you could clean your solution but I preferred manual deletion.
I just closed and reopened VS. This seemed to fix my problem
On another computer, with the RTM of Visual Studio 2012, I opened an older project and found that I could not press F5 to start the application. All that seemed to happen was a message in the status bar on the bottom edge of the window: "This item does not support previewing".
This solution had two projects, and the correct one was bold in the Solution Explorer, presumably indicating that it was the startup project.
However, after selecting the project and choosing "Set as Startup Project" in the context menu, I was then able to use F5 to run and debug it.
It turns out that the "This item does not support previewing" was nothing to do with the problem, but is a message that shows on the status bar whenever the item just selected in the Solution Explorer does does not support previewing.
For what it's worth, I found that I received this error message when I had an entry missing in my hosts file. I am using local domain aliases and the one I was trying to debug with wasn't in hosts. Adding the missing entry solved the problem for me.
Just copy all dte*.olb files, from C:\Program Files (X86)\Common
Files\Microsoft Shared\MSEnv to C:\Program Files X86\Microsoft Visual
Studio 9.0\Common7\IDE.
From https://mycodepad.wordpress.com/2013/12/07/visual-studio-2012-4-run-as-administrator-the-application-cannot-start-error/
Just my two cents,
I have experienced this issue twice now and it turns out after all of the suggestions I tried, it was BitDefender on my local machine that was doing this. So my fix for this problem is to try adding in exceptions to the local security software into the firewall and AV parts of it. Tell it to ignore the msvsmon.exe and devenv.exe altogether and see what difference that makes.
Otherwise try ripping it off altogether and see if the it lets you debug your solution.
You can see here for more info: http://forum.bitdefender.com/index.php?showtopic=37028
I installed the latest BitDefender version and all was fine for me.
I personally encountered some comparable problem: Visual Studio 2010 did not begin debugging but froze.
When I clicked VS it displayed a "Wait some more" or "Switch to" message box which didn't help me.
Using a task manager I could kill the *.vshost.exe process which brought VS back to life but aborted the debugging. Launching the program without debugging started the application instantly.
Solution:
Disable the indexing service for your code directories! Either deactivate the index service or uncheck the folders in the Indexing Service control panel.
Had this problem for a C++ application. Looking at the devenv.exe events in ProcMon pointed me to it trying to load a Visual Assist configuration file, which I had in my disk cleanup zeal accidentally deleted. Removing and then installing the extension again fixed it for me.
I have fixed the same issue by checking off the "Enable the Visual Studio hosting process" option from the start-up project Properties->Debug - Enable Debuggers options
All you have to do to fix this is go "Project > Set as StartUp Project" then hit F5 or the debug button and it will work!!!

Debugging silverlight application problem

My VS2010 doesn't stop at breakpoints inside of silverlight application. It appears that no symbols for it have been loaded during debugging. When I hover over the break point it says "The braekpoint will not currently be hit, no symbols have been loaded".
I have tried all of possible solutions offered by google and have no success. The problem occurs even when I create brand new silverlight app hosted by an ASP .NET web project. All of my project configuration looks fine - silverlight debugging is enabled in the Web project.
I am using silverlight 4.
here a link to the sample project created out from the tepmlate.
Any thoughts ?
P.S I just tried to reinstall VS2010 and the problem still exists.
EDIT: I just tested the same project on another machine and it stops at the break point it seams that the problem is somewhere in the configuration of VS or silverlight.
with Matt Dotson's help I managed to attach the debugger manually. However this solution is not good enough for daily use.
Depending on my experience in Silverlight following these steps keep your project debug-gable.
Condition 1>
Firstly we need to be ensure that in Web Project's properties there is a Web section, as you see below Silverlight checkbox must be checked.
Condition 2>
Follow In Menu Debug => Attach Debugger>
Visual Studio sometimes can't attach debugging platform you need to lead the way :) . By this way you may debug other platforms,(also you may debug your product platform but pdb files must be sync and don't forget you may suspend your product platform using this).
Condition 3> Your default web browser may be Firefox,Chrome or other than IE.By Visual Studio default try to attach to IE. But when you run VS calls default browser,so you need to have a manual attachment in Condition 2 or set your default browser by right clicking on default page > Browse with .
Condition 4> There is xap file generally located in web project\ClientBin directory. Sometimes after build operations this file can't be replaced and your ProjectDll and your Project PDB files not be sync. This cause wrong line match while debugging or can't find a debugging file attached caution. I strongly suggest delete all generated files in Bus project and delete Clientbin\ProjectName.xap file. After rebuild all it must be ok!
Hope helps.
What broswer are you using? You need to be using Internet Explorer to debug silverlight projects.
I have had a similar frustrating experience with this but in my case the solution was very simple. It seems that somehow, and I really have no idea how, the debugger option for Silverlight had become unchecked in the properties on the hosting ASP.NET project.
I just assumed that as I had been previously debugging, this option was set and I didn't bother to make sure that this was this case. Just goes to show that one should always check the basics first; if I had done that it would have saved me some time.
To check this in VS2010, right-click on the project and select properties, change to the Web tab and check the Silverlight option at the bottom of the page, in the debuggers section.
Also see the debugger to a silverlight process
http://msdn.microsoft.com/en-us/library/cc838267(VS.95).aspx
If that doesn't work, then
reset iis (if you are debugging in that)
delete temporary asp.net files (%SystemRoot%\Microsoft.NET\Framework\versionNumber\Temporary ASP.NET Files)
clean and rebuild your solution
The resolution came after 2 days of headbanging. It appears that the link which Malcolm gave covers exactly my problem but my I was narrow-minded enough not to pay it enough attention because when I run the debugger as long with the app my default browser was FF. So I thought that after the FF starts I can load the page from IE or Chrome.
Actually the problem is that the debugger cannot be attached to the silverlight project because of the FF. And when I load the app from IE or Chrome the debugger dis still not attached.
Thanks to everyone that tried to help.
if you have multiple project, Rebuild the project separately that you want break point. Its work for me
Try also picking internet explorer from browser list menu as your browser

WPF Application Hang

I'm using Windows 7 Professional (x64) and having installed .NET 4.0 RTM on my machine.
Since 2 days I'm noticing that every WPF application that I'm trying to run hangs and becomes non responsive (a not responding text is appended to it's title bar) and it's painted white.
There is no info regarding any exception, no error message. Nothing. Even the Event Log shows that there was "application hang" event (code 1002) and nothing more.
This problem is for everything that is written in WPF, even for products like NHibernate Profiler and other stuff that I was using on a regular basis without any issues.
Tried to reinstall .NET 4.0 and nothing changed. Any ideas why this might be happening?
I had the same problem. It was a corrupt font cache!!
See http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/7cc032c1-5f4d-4518-adc6-f53afd051e6b for a solution.
If I had to guess I would say video drivers. It might help to try attaching Visual Studio's debugger to the hung process (Debug -> Attach to Process) making sure that Managed Code is the selected debugger type. Then you can break into the debugger and maybe see a common stack trace.

Resources