Visual Studio 2015 does not hit breakpoint when debugging WF workflow - debugging

Visual Studio 2015 does not hit the breakpoint that I set when debugging WF workflow. Are there any settings that I have missed?
Steps to reproduce:
Create new workflow console application
Create workflow, e.g. just a WriteLine activity
Set breakpoint on activity in workflow designer
Hit F5 to run in debug
This works fine in VS 2012 and 2013, so I am thinking that either I am missing a setting or there is a bug...

Solved by disabling "Just my code" in debug settings. In my opinion the workflow is "my code" though...

I have bumped across this issue multiple times where Workflow does not hit the breakpoints in the designer. This is not something specific to VS 2105, since I have encountered this with VS 2013 also.
As a resolution, You will need to move any random control in your workflow, save, build the solution and then give it a try. The root cause of the problem is that there are scenarios when the debug symbol line in the XAML does not update, and hence Workflow is not able to identify recent changes.
If you are able to recreate this issue again, check the debug symbol line in the XAML file & you will find that it did not update. Once you just move any control on the workflow, the debug symbol should be getting updated and your breakpoint will be hit in the designer.
Let me know if this does not resolve this problem.

When "Just my code" is disabled (unchecked) then step into (when debugging code) does not work.
In documentation you can find a warning box with text:
Ensure that you select the option Enable Just My Code (Managed Only) from the Tools, Options, Debugging menu before you debug. If you have two sequences nested within another sequence and you set a break point on the first inner sequence, pressing F11 will not debug into the second inner sequence if the Enable Just My Code (Managed Only)option is not selected.
https://msdn.microsoft.com/en-us/library/dd489405.aspx?f=255&MSPPError=-2147217396

Related

Visual Studio 2017 Enterprise Diagnostic Tools no longer shows events at all

Okay so it appears in the last week or so my Enterprise Visual Studio 2017 can no longer get the 'Events' to populate at all for the Diagnostics tool. The tool shows up and runs just fine, it however does not have any events even as I can see and when clicking the filter. Except funny enough it can load symbols and still hit breakpoints and even tell me: "Yep I got your breakpoint event". The problem being I used it a lot for ADO.NET and data tracking to double click an item and get the 'historical debugging'. Basically the 'Filter' says I don't have events yet and even if it hits a breakpoint it only acknowledges the one event.
Things I have tried:
Deleting the SUO files for the solution I am on.
Checking the Debug General Options against another Dev whose is working. And ensuring 'Enable Just My Code' is on.
Changed Configuration settings from Debug to Release and changing CPU configs to see on the off chance this could be it.
Shut down the PC and rebooted.
I tried suggestions on this thread:
Visual Studio 2015 diagnostic tools no longer working
In your screen shot, it just has the break events, no IntelliTrace Events.
(1) Please add a breakpoint in your app, and then debug it, after the breakpoint was hit, check the Event.
(2) I think you could enable the IntelliTrace under TOOLS->Options->IntelliTrace, please enable IntelliTrace. Debug it again.
(3) Of course, not very sure that whether it is related to the project type, for example, just create a simple Winform app, test it again.

Visual Studio 2010 breakpoints consistantly not being hit

I have an issue with Visual Studio 2010 and an ASP.NET 2.0 project.
I have searched StackOverflow for a possible solution to my problem, but even though there are alot of articles related to the Visual Studio debugger, none specifically solve my issue.
Every time I start debugging, Visual Studio tells me that "The breakpoint will currently not be hit. The source code is different from the original version.". In the past when I got this problem, I could solve it by doing a Clean Solution. Or if that didn't work, I could always restart Visual Studio or my machine and the problem would be gone. This, however, doesn't work anymore. The solution cleans and I can rebuild, but the debugger still complains about the source.
I found that if I delete the folder "root" in "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files", the problem is temporarily gone but only the next time I start the debugger, and only for the breakpoints that are currently set in the project. All breakpoints I add when the debugger is running are also not being hit due to the source/original difference.
I don't know how to solve this issue permanently because I don't want to delete that folder every time I have to start a debug session.
I also have a few ASP.NET 4.0 projects that debug just fine.
I use Windows 7 Enterprise (x64).
If someone has a suggestion I would very much appreciate it :)
Try this
Right click solution.
Click "Property"
Go to: "Common Properties" -> "Project Dependency"
Select your "project" from drop down list
Check every item in list of "Depends on"
Click "OK"
Now Open "Task Manager"
And kill all worker process i.e. "w3wp" in case of iis7
Or Kill all "WebDev.WebServer40.exe" process
Now run your application.

What would get edit and continue working again?

Visual Studio's edit-and-continue feature stopped working at some point again.
VisualStudio 2010 sp1 professional. I'm writing a dll with c++ native code. I run the host 32bit executable from the ide. I have the .pdb beside the .dll. I tried just editing some whitespace to eliminate the possibility that I'm creating scenarios that aren't possible to inject. I hit "apply changes" and this is what I see in the output window.
-------- Edit and Continue build started --------
--------------------- Done ----------------------
However I see this in a dialog that pops up:
Edit and Continue
----------------------------------------
Edits were made which cannot be compiled
Click Edit to fix the code.
Click Stop to stop debugging.
Click Ignore to continue without applying edits
[Edit][Stop][Ignore]
Anyone have ideas about how to go about fixing this? The code does compile. Debug breakpoints work. I just want to cut down on the long start-up times this application has to do the testing.
If this works for you, you can upvote the original Post by the author of this link (and its answer): Can't edit and continue when using Visual Studio 2010 on a 64 bit machine, app targets x86

Visual Studio 2008 Designer File Bug?

This has been driving me crazy for months. I have a multiple projects that compile without errors. If I start copying and pasting controls (or even just plain 'p' tags) the designer will fail 1/2 the time with the error "the method or operation is not implemented". The complexity of the page doesn't matter. The 'solution' is to delete the designer file, exit visual studio, open visual studio and convert the offending aspx file to a 'web application' to regenerate the designer file.
This is a really annoying. I can't find any fixes on Google. Is there a way to disable the automatic designer file? Make it so it only generates on a 'build' command and not fail everytime I'm laying out a aspx page?
Thanks
To find the fix for the issue you would need to find the cause of the issue. It might be possible to get more information on what is causing the issue if you attach a debugger to Visual Studio. This could be done by following these steps:
Open two instances of visual studio (run as administrator)
In one, open your project and get to a point right before the issue occurs
Attach the other instance of Visual Studio to the one with your project (Tools -> Attach to Process)
Perform the steps to reproduce the issue.
Note that to actually catch the exception you will need to change a few debugging options. First you would need to make sure that the Just My Code check box is unchecked in the General debugging options in Visual Studio. The second is on the exceptions dialog you will need to catch thrown exceptions. The exception dialog is under the Debug menu in Visual Studio.

How to stop "Just In Time Debugging" messages blocking a buildserver

Our buildserver (TeamCity, much recommended), runs our a whole bunch of testsuites on our finished c++ program.
Once in a whole, a test causes our program to crash, often bringing up a VisualStudio dialog offering me to JustInTime debug the crash. The dialog stops the buildserver from progressing. Instead of the build marked as failed, it just hangs. I've turned off the Just In Time debugging feature in VisualStudio, but when it's turned off, you still get a message "Couldn't JustinTime Debug this, you can turn it on in the options".
Does anybody know of a way to ensure that any unhandled exception in a program does not result in any modal dialog?
This MSDN article explains how to disable Just-In-Time debugging on a Windows server. I've included the relevant portion of the article below:
After Visual Studio is installed on a server, the default behavior when an unhandled
exception occurs is to show an Exception dialog that requires user intervention to
either start Just-In-Time debugging or ignore the exception. This may be undesirable for
unattended operation. To configure the server to no longer show a dialog when an
unhandled exception occurs (the default behavior prior to installing Visual Studio), use
the registry editor to delete the following registry keys:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\DbgManagedDebugger
On a 64-bit operating system also delete the following registry keys:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\DbgManagedDebugger
Delete (or rename) c:\windows\system32\vsjitdebugger.exe.
I tried deleting the registry keys, and I tried unchecking all the boxes in the Visual Studio options, but neither worked.
To be clear, my situation wasn't a C++ one. I was using Micro Focus COBOL for Visual Studio 2010, and by using the registry and VS options suggestions I managed to get rid of the "Want to debug?" dialog, but that resulted in a different dialog to hold up my automated process:
Visual Studio Just-In-Time Debugger
An unhandled exception ('COBOL runtime: Fault detected') occurred in CASDBC.exe [3564]. Just-In-Time debugging
this exception failed with the following error: No installed debugger
has Just-In-Time debugging enabled. In Visual Studio, Just-In-Time
debugging can be enabled from Tools/Options/Debugging/Just-In-Time.
Check the documentation index for 'Just-in-time debugging, errors' for
more information.
OK
I would not recommend to edit/remove regs. Usually the registry is a mess to play with.
The solution that helps me is a quite simple. I`ve just added JIT debugger to my Visual Studio. Steps are:
Open Windows Control panel
Programs
Programs and Features
Find Visual Studio 2017
Click Change. On a new opened window navigate to the Individual Components tab
Check Just-In-Time debugger checkbox
Click modify
After VS reload the error should be fixed.
In my case , on win2012 server, I tried:
removing registry keys
deleting the exe for the jit debugger from c:\windows\system32
and it still came up!
I rebooted, etc.
Was making my web site in IIS stall until dialog was acknowledged!
Final solution, which did work: In control panel, in Programs: Uninstalled "Microsoft Visual Studion 2010 Shell (Isolated)" Uninstalled that, and problem solved.
(Whether SQL Management Studio still works.... I do not know!)
In the Window for the question
Do you want to Debug using the selected debugger?
Click YES (new window opens) > OPTIONS (top row menu) > DEBUG
Then in the New window remove the TICK which shows ENABLE JUST IN TIME DEBUGGER.
After disabling the JUST IN TIME debugger close the window or click OK
Your problem will be solved. I've tried this and got rid of the JUST IN TIME POP UP messages.
Best Solution for this problem is so simple
2 steps to make it done
open cmd prompt
type : regedit
go to path-->HKEY_LOCAL_MACHINE-->SOFTWARE-->Microsoft-->Windows NT-->CurrentVersion-->AeDebug
You can find now the file : Debugger
right click , Modify
copy and paste this text inside it:
drwtsn32 -p %ld -e %ld -g
click ok and voila :)

Resources