VS2013 Javascript Debugging - visual-studio-2013

Does any one know how to enable in page JavaScript script tag debugging?
In vs2012 i can go to the page in visual studio which is running in the debugger and create a break point however in vs2013 i get "A breakpoint could not be inserted at this location"?
Thanks

try to keep your scripts in separate files and put the breakpoints in that files. I had the same problem but when I moved java scripts from my views to script files I was able to debug. It may not be a solution but at least you should be able to work.

There was a known issue in Visual Studio 2013 that caused breakpoints to not work correctly inside script blocks. A fix was made and is included in the recently released Visual Studio 2013 Update 2 RC, which you can install from http://www.microsoft.com/en-us/download/details.aspx?id=42307.

Related

Visual Studio pops to the foreground without reason

I am experiencing this weird problem with Visual Studio 2022.
I created the skeleton of a new web application using individual accounts.
I have run the first migration, created some default accounts in the aspnet identity tables and
finally launched the application to test if everything was correctly setup in my PC.
Visual Studio compiles the application without problems and launch the defaul browser (Edge).
The standard Welcome page appears but immediately Visual Studio pops to the front doing nothing.
No errors, no messages nothing wrong. Just the code window here to obscure the browser window.
Now, I switch to the browser window and click on the Login link.
Again, the login window briefly appears in the browser but it is immediately obscured by Visual Studio.
Switch again to the browser, compile the required fields and click on login.
Again Visual Studio thinks that he is the best app on the planet and brings itself on the foregroud.
I have tried to switch to another browser, but the results are the same.
I have tried with an existing application written with Visual Studio 2019, but again the "pop in front of everything" still happens.
I have tried to search for this problem but probably I haven't find the right keywords to represent this problem correctly to a search engine.
I think that probably I have something wrong in the Visual Studio configuration, but it is practically impossible to find something there if you don't know what to look for.
The only option that seems to be related is "Bring Visual Studio to the foreqround when breaking in the debugger" but even after uncheking the option the "pop to front" persists.
So my question is simple. Has anyone experienced a similar behavior? If yes how have you fixed it?
Well, probably this situation is so messed that none will ever see this post.
Nevertheless I would like to share how I have finally resolved the question and leave here a warning for future readers.
The cause of Visual Studio 2022 hiccups is, probably, the import of Visual Studio 2019 settings.
I thought that it was a good idea to set 2022 with the same options used in the last 3 years so, after installing VS 2022
I used this very useful menu (Tools->Import Export Settings) to export all the Visual Studio 2019 Settings in an XML file and I reimported it in 2022.
I thought, if the file is not compatible with VS2022 surely it will abort the import. Right?
No, Visual Studio 2022 doesn't complain during the import of 2019 settings.
But something in that exported file should be very broken.
I have resolved the problem with these steps
Close Visual Studio 2022
Open a command prompt window with administrator rights
Change to the install folder for Visual Studio 2022 and then change dir to subfolder "Common7\IDE"
Finally execute the command
devenv /ResetSettings
After this everything started to work as expected without problems.
I have saved the broken VS2019 setting file and tried to compare it with one produced after the reset,
but they have too many differences to extract something useful to identify the specific problem area

If I remove Visual Studio will this affect the Script files I previously did in the Unity project?

I have decided to remove Visual studio; Because it does not auto-fill for me when I write the code, so I want to know if I delete it will that will affect the previous C# files I wrote in Unity !?
I haven't deleted it yet. I also went into the program settings to solve the autofill problem but to no avail.
It will not.
Uninstalling Visual studio will not affect any project files as the uninstall program won't even know they exist.
I often have to uninstall and reinstall VS Code + VS 2022 when updates break it or I'm just quessing at issues and it has never removed my code files.
No. As long as you don't delete the script files, you should be fine.

Visual Studio doesn't run programs

I downloaded visual studio for C# and now my problem is that when I run a program the very first time it runs without issues but the second time after exiting the program it shows this (pressing f5 also does nothing):
I have tried repairing Visual Studio and uninstalling and reinstalling it but that also doesn't work. It happens to other files too like Python files or asp.net files. Anyone know what's going on?
Try setting your project as a StartUp Project.
See this answer for details.

Visual Studio - how to reverse optimized code

I need some help. I have put in dozens of hours into a VB.NET project, it has been built in release mode and distributed. Now I have to make some changes to it, and I am unable to debug it properly. My code changes result in behavior where my code is not even recognized.
Also, I installed Visual Studio 2013 recently (moving from 2010), but this project behaves the same in both environments.
I believe that my code has become 'optimized'. The error window tells me that code is being skipped over, and that my code is optimized and JIT is checked.
I have turned off JIT, and I have tried everything to make this project work again that I could think of. I am desperately wanting to know how I can get this project to be in a state where it will debug each line of code again when I make changes.
I can even purposely write bad code, and the debugger does not see it.
This project is now in debug mode, not release. I have checked and followed threads on every thing that other people have done to solve this issue, but nothing works for me.
Either my project launches and works properly as it is coded, or if I change any code only the form launches with no code being run - at all.
please help.
I finally figured it out. The applications that I was struggling with were all built in Visual Studio 2010 on Windows 10. I was trying to work with these in Visual Studio 2013 on Windows 7.
Once I tried to work with them on Windows 10 (visual Studio 2013 this time), they started working and debugging just fine.
I think it may have been DLL assembly paths? Took me more than a week, but I figured out my issue by moving from Win7x64 to Win10x64.

Visual Studio 2017 crash

We are running into a problem opening our MVC5 solution in Visual Studio 2017. It will show a message saying loading projects, followed by "Preparing solution" and then it just freezes. Some preliminary research has lead to suggestions like
Remove the hidden .vs folder
Repair installation by running as admin
Updating to the latest released VS build
Remove any node.js type folders that have deeply nested folder structure within the solution folder
However, none of these have worked. Has anyone else run into a similar problem using VS 2017 with their solution? There are no special commands on packages loaded on startup.
I was able to finally get it to work. I updated to the latest Visual Studio build 15.0.0+26228.10, but that did not seem to help. After removing my .vs folder before opening the solution multiple times, it finally started to load. I have no 3rd party extensions or tools running.
I installed visual studio enterprise 2017 version 15.0.0+26228.10. and productivity power tool extension. the studio keep crashing when load project. I uninstall everything and reinstall vs only, the crash problem disappeared.
Deleted the vs folder, but it didn't work.
Looked for recently changed files in the project, saw Web.csproj.user — when I removed this the project works again.
Visual studio 2017 keeps crashing when i try to launch it,all i did was to launch visual studio installer go to more which is under the product am using then clicked on repair and that got me running again.
We saw some lockups, especially during the start of Batch Builds, until we set this experimental feature to False:
Tools > Options : Text Editor > C/C++ > Experimental : Enable Faster Project Load.
I don't know whether it could apply to your problem or not, but it is related to loading projects, so...
Good luck.
I had the same issue and uninstalled the ankhsvn subversion plugin then closed and re opened vs 2017 ad it worked.

Resources