In my C# windows application, I get this 'Xaml.UnhandledExceptionEventArgs' when I run it in my debugger:
{Windows.UI.Xaml.UnhandledExceptionEventArgs}
{"Access is denied.\r\n"}
false
"Access is denied.\r\n"
To inspect the native object, enable native code debugging.
Does anyone has any idea how to debug that?
Thank you.
I would expect you need to do this :
The Unmanaged code debugging property, available on the Debug page of the Project Designer, determines whether debugging of native code is supported. Select this option if you are making calls to COM objects, or if you start a custom program written in native code that calls your project and you need to debug the native code.
To enable debugging of unmanaged code
With a project selected in Solution Explorer, on the Project menu,
click Properties.
Click the Debug tab.
Select the Enable unmanaged code debugging check box.
From msdn
Related
In Visual Studio 2019, I don't see the option to show the full call stack including native code when right-clicking on methods in the call stack.
I've tried setting Tools -> Options -> Debugging -> "Enable Just My Code" to unchecked. I was unable to investigate the registry hack mentioned, because the path does not exist on my system.
Source: https://blogs.msdn.microsoft.com/zainnab/2010/10/24/show-external-code/.
No code is suitable for demonstrating the issue, but please see the image.
I see [Native to Managed Transition], but expect more detail such the methods above and below that begin with win32. Furthermore, I expect to see Show Native Code when right-clicking on a method in the call stack, but do not.
As mentioned by Hans Passant, turning off /clr achieves the desired effect. I had no idea it was even on!
Rider makes it easy to debug the 3rd party code. But sometimes it is just too much noise when debugging my own code.
VS has the option "Just My Code" which lets us debug only our code. Does Rider has the same?
Here is how it should work. All exceptions are disabled but Any Exception options has Only in my code option checked. It works as allowed filter with no exclusion.
Help about this page: https://www.jetbrains.com/help/rider/Breakpoints_dialog_Rider.html
There is also another option: Process exceptions outside of my code.
I was not able to see any differences with this option enabled/disabled.
Help is unfortunately empty for this option: https://www.jetbrains.com/help/rider/Settings_Debugger.html
Yes, there is an option as documented here
To disable external-code debugging
Clear Enable external source debug on the Build, Execution, Deployment | Debugger page > of JetBrains Rider settings Ctrl+Alt+S.
If this option is disabled, you can still
navigate to the external code and set breakpoints there. However,
breakpoints in external code will be ignored by the debugger and you
will not be able to step into the external code. So your debugging
experience will be limited by the source code in your solution.
I'm trying to use Appcelerator studio's debugger but when I run application in debug mode it skip all breakpoints. In debug view studio show "Running" instead of "Debugging". I've tried whit various version of node js, titanium sdk and appcelerator studio, in 3 different machine with 3 different OS.
Can anyone explain me how does it work? or how can I use breakpoints?
Thank you all for the answer!
This might help.
http://docs.appcelerator.com/platform/latest/#!/guide/Debugging_in_Studio
As mentioned in the doc, To launch a project in debug mode, first select the project in the Project Explorer view, then in the global toolbar, select Debug from the Launch Mode drop-down list and a device from the Target drop-down list. If the Launch Automatically option is enabled under the Target drop-down list, the application will be automatically launched after the target is selected. If not, you need to click the Launch button to start the build process.
Let me know if you still can't debug it.
Appcelerator is so buggy that the official answer to do something does not work 90% of the time. So to debug i had to follow the next steps:
Just exactly on the line you want to debug add the following line:
debugger;
Put the emulator on debug
After waiting the loading time debug and it stops where you want to
debug.
I'm working on a project in Silverlight and somewhere an exception is thrown. I'm not concerned with fixing the exception... I just want to find it.
Instead of Visual Studio popping up and showing the the line where the exception happened, I instead get a little window labeled "Just In Time" which mentions an error 4004, a managed runtime error. It asks which debugger I want to use to solve the problem. But, it only provides one option: a new instance of Visual Studio. If I try to accept its proposal, the new instance complains that a debugger is already attached.
Why doesn't the instance of VS which built the program and is already running catch the exception and show me where it is?
That is strange behavior. The first thing I would do is change a few settings
Disable Just My Code
Enable native debugging
Break on first exception thrown
This should help you narrow down the place where the exception is occuring.
Disable Just My Code
Tools -> Options
Debugger
Uncheck "Enable Just My Code"
Enable Native Debugging
Right click on the project and select properties
Go to the Debug Tab
Check "Enable Unmanaged Debugging"
Break on first exception thrown
Debug -> Exceptions
Check "Throws" for Common Language Runtime Exceptions
Silverlight has a habbit of swallowing exceptions. I call this "silent failure" and have found it very expensive and frustrating. When working with Silverlight do everything you can do expose exceptions, e.g. binding failures.
Have a look here: http://msdn.microsoft.com/en-us/library/cc189070%28v=vs.95%29.aspx
Also there is a setting on elements to have them visualise binding failures but I forget what it is as I'm not working in Silverlight any more.
Looks like the problem is the type of debugging. In your project properties make sure you enable Silverlight debugging. In your website project right click, go to properties, then on the 'Web' tab at the bottom there's a section called Debuggers. Make sure that Silverlight is selected.
Sometimes the JS debugger is attached to the IE process, which means that there's a debugger attached, but it's simply not the debugger you want. I think this might be the cause of this problem.
Hope this helps.
Miguel
click debug, choose exceptions, mark common language runtime exceptions as thrown.
I had the same problem and it fixed the problem for me
I'm debugging a class library which is testing by a demo application. Each time I make a change in code and set a break-point I should:
Compile code
Run demo executable
Attach debugger to demo.exe process
Can I automate these steps in some way ?
Right-click your class library project, Set as Startup Project if necessary. Again, Properties, Debug tab. Select "Start external program" and select your 'demo' program's EXE.
Pressing F5 now automatically starts the demo program with the debugger attached. Don't forget to take advantage of Edit+Continue.
You don't need a demo application. Just create unit test for the library.
http://msdn.microsoft.com/en-us/library/ms379625(v=vs.80).aspx