Has anyone been able to get this going with VS 2010 SP1?
I've tried the instructions at:
http://msdn.microsoft.com/en-us/library/x54fht41.aspx
http://referencesource.microsoft.com/serversetup.aspx
http://blogs.microsoft.co.il/blogs/arik/archive/2010/07/12/step-into-net-framework-4-0-source-code.aspx
http://referencesource.microsoft.com/troubleshooting.aspx
This is very frustrating.
UPDATE (More information):
My debug test code looks like this:
private void TestSymbolDebugging()
{
string myValue = this.txtData.Text;
}
and the breakpoint is set on the only line of code in the method.
If I just F11 (step into) it skips over the line with no error but it doesn't break into anything either.
If I right click and select 'Step into specific' I have the choice of System.Windows.Forms.get_Text. This gets me the No Source Available window.
I have 'Enable .NET Framework source stepping' checked.
I have 'Step over properties and operators (Managed only)' unchecked.
I have 'Enable source server support
I have 'Require source files to exactly match the original version' checked.
In the modules window I show the System.Windows.Forms assembly is loaded.
Related
I have accidentally made a setting change to VS2019 and I can't get back to how it was.I was debugging a Azure Functions project with out any problems. I was trying to set up the project to use XUnit to test the functions and set the appropriate start-up projects. I couldn't get the azure functions project to hit debug breakpoints. In the end I gave up and decided to use two instances of VS2019 but now I can't hit any breakpoints int the Azure Function app. I also noticed the command prompt window which starts when you run the app doesn't shut down when you click stop in visual studio. I saw a SO question saying to check:
Use Managed Compatibility Mode.//should be Unchecked
And unchecked which it is.
Any ideas on what setting is incorrect?
TLDR: Uncheck the "Automatically close..." option in the image below.
I have encountered the same problem with Azure Function projects, and found a solution to this. Symptoms:
Breakpoints are not being hit (silently ignored by VS)
Adding a breakpoint during debug gives a white breakpoint and "Breakpoint wont be hit..." message
The reason for this is that modules are not being loaded. This can be confirmed by opening the "Modules" window in VS during debugging (ctrl+alt+U, or search for it in top right). This window was empty for me (but filled with references if i was debugging a console application for example).
To get module loading to work, i had to uncheck the debugging-option "Automatically close the console when debugging stops". And suddenly my modules-window was filled during debugging, and breakpoints working.
For me, somehow my own project had been added to the exclude list in Debug => Options => Debugging => Symbols => Specify Excluded Modules
I'm trying to debug an executable (.exe) using Visual-Studio (2019). I opened a new solution and added a command contains the path of my exe, as describes in here How do I attach Visual Studio to a process that is not started yet?.
Because of I'm interesting at the first instructions it executes, I want to set a data breakpoint /breakpoint in a specific adress that I've found on the disass window .
when running the solution and hitting the 'Break all' option, I could view the disassembly window, and then I've found the location that I want to break at. When I placed there a breakpoint and restarted, it seemed that the breakpoint was marked off.
How can I achieve that?
Here is what I've tryed so far:
Playing around with the Debugger type window (Solution => properties => debugging => Debugging type)
Open a new solutio, and try it there
Any help would be much appreciated!
You can open the exe in VS like you would a project/solution. From the VS menu use File->Open Project/Solution and select the .exe file you want to debug. This will create an 'exe project'. You can launch it with F5, to pause on the 'first' statement you can launch with F10 instead. Then when you set breakpoints if you save the solution they should be persisted for when you next launch the exe. You'll need symbols and source for the exe if you're to make much sense of when you debug though.
I'm trying to get managed Edit & Continue working (in Visual Studio 2015 v14.0.25425.01 update 3) and it's giving me the dreaded dialog, "Changes are not allowed in the following cases:"
Attached to a process that does not support Edit and Continue on attach.
I'm using IISExpress v10.0.14358.1000, on Windows 10.0.10586, x64.
I have 'Use the 64 bit version of IIS express for web sites and project' checked in Tools->Options. (although, i also get the same error with 32-bit iisexpress)
all my code is compiled 'Any CPU'
The code being debugged was optimized
Nope, the all the code is built with the DEBUG constant set, and no optimizations.
The assembly being debugged is loaded as domain-neutral
Nope, i checked with Process Explorer, the assembly isn't loaded DomainNeutral.
The assembly being debugged was loaded through reflection.
Not sure about this, but it's a regular ASP.NET MVC 5 app.
Intellitrace events and call information is enabled.
Nope, intellitrace is disabled in Tools->Options->Intellitrace.
The .NET Runtime this program is running on does not support edit and continue.
Not sure. It's built against ".NET Framework 4.6.1", and the first symbol load is "'iisexpress.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'"
some other things:
in the 'Web' project settings, both the 'ASP.NET' and 'Enable Edit & Continue' checkboxes are set (and none of the others).
i have 'Edit and Continue' enabled in the Debugger settings.
i have compatibility modes disabled in the Debugger settings.
i have tried deleting my .suo files and the .vs directory, cleaning out my temporary directories, doing a full rebuild
what else can i try?
PS. if anyone on the VS debugger team is reading this, can i ask a favor? please kill this dialog and replace it with something that indicates the actual cause of the problem. You have the debuggee right there, and the solution, you can determine which of these is causing the problem and you can have a button which fixes the problem with a single click.
ok, for posterity. it turns out that the problem was caused by an environment variable (which presumably was configured by the profiler at some point):
COR_ENABLE_PROFILING=1
removing this fixes edit & continue.
it would be great if the error popup could mention this, or even detect it and give you an option to fix it for you...
I have a unit test dll that references function dll.
When I used VS2015(Enterprise) to debug, breakpoint in unit test was hit, but the breakpoint in function was not.
The message from output window is:
Step into: Stepping over non-user code 'function dll namespace + method name'
Debug->Windows->Modules shows the function dll has been loaded with "User Code" Yes; Optimized "NO"; Symbol Status: "Symbols loaded"
This problem doesn't happen on VS2013. Does anyone know the new change from VS2013 to VS2015 please?
The function dll references some other dlls that was built using MSBuild, which I am not sure the version number. Is this probably a reason?
You should disable "Just My Code" option in VS. Go to Tools -> Options -> Debugging -> General and disable "Enable Just My Code"
I'm working on a web page as part of an ASP .Net application. When I include my JavaScript within a script node in the page I can set breakpoints in the JavaScript in Visual Studio and when I debug the project (which launches the page locally in IE) the breakpoint is successfully caught in Visual Studio and I can use it to inspect variables, step through, and do all the usual Visual Studio debugging stuff. However, when I move my JavaScript to a separate script file breakpoints stop working, and I see the message 'The breakpoint will not currently be hit. No symbols have been loaded for this document.'
I know I could take advantage of the browser's debugging tools but how do I get Visual Studio to hit breakpoints in a JavaScript file in an ASP .Net application?
It would also be good to understand why the breakpoint works when the JavaScript is included in a script node within the HTML page, and fails when it is moved to a separate JavaScript file?
Here are the steps:
1) First open Visual studio -> select your project in solution explorer.-> Right click and choose option "browse with" then set IE as default browser.
2) Now open IE. Go to,
Tools -> Internet option -> Advance -> uncheck the checkbox having "Disable Script Debugging (Internet Explorer) and then click Apply and OK and you are done.
3) Now you can set breakpoints in your JS file and then hit the debug button in VS.
I think the point I made in the question about having the JavaScript in the HTML file versus in a separate script file may have been misleading. It tried copying it back and it still did not work!
I have made two changes and now it is fixed (though I am not sure which one fixed it).
Firstly I checked the closing curly brackets on each function in my JavaScript (after reading robert4's answer to What can be the reasons for JavaScript breakpoint is not hit) and added a missing semi-colon after the function I'd recently added.
Secondly I held down the Ctrl key and clicked refresh in the IE launched by Visual Studio which should force a page reload (instead of loading from IE's cache).
I'm assuming that the second of these changes fixed things but I've included the first to just-in-case it proves useful.