I am attempting to debug a custom plugin that was developed so that I can track down some errors that is causing ArcGIS to crash.
My problem is that whenever I set up a breakpoint I get "No symbols have been loaded for this document"
So I tried placing in a Stop point so I can step through after a known event e.g. Mouse click
Still ArcGIS crashes and the debug halts entirely.
It almost seems that ArcGIS has just loaded the program in and isn't returning anything back to Visual Studio.
Any insight on this would be greatly appreciated.
-UPDATE
I think it may have something to do with the API as it will still run once the debugger has stopped.
Try to “clean solution” and “rebuild solution”.
"No symbols have been loaded for this document" message shows that your current code does not used in running application.
Related
My app builds fine. Attempting to start it in debug mode, however, causes this error. This appeared after I solved an error relating to missing "debug symbols" similar to the one here (enabling the remote symbol servers in the options and then building caused this error to appear instead - this behavior persisted even after turning off the remote symbol servers in the options again).
I am using WinUI3 project on Visual Studio 2022 on Windows 11.
This post seems to suggest the issue was using WPF - but I am not using WPF. I also see a potentially similar issue here, but there appear to be no answers.
I am not sure where to even begin fixing this - it seems to be a Visual Studio issue or a project/solution config issue rather than a code issue. Any ideas?
I fixed it. I was looking at the output in the Visual Studio Console (after stopping the app once the error mentioned in the question happened), and I saw this:
Exception thrown at 0x00007FFD41D4466C (KernelBase.dll) in EmailClient.exe: WinRT originate error - 0x80004005 : 'WinUI: Error creating second Desktop Window on the current process. No more than one Desktop Window is allowed per process.'. onecore\com\combase\winrt\error\restrictederror.cpp(1017)\combase.dll!00007FFD43EAA21E: (caller: 00007FFD43D9A2F3) ReturnHr(2) tid(5e98) 8007007E The specified module could not be found.
I then searched through my project, and found out I was calling new MainWindow() one place in my project outside of the App.xaml.cs when initializing a property. I removed that (initializing the property to null instead), and now the app works fine. Not sure how the two are related... but this may be an unexpected behavior caused by attempting to create multiple windows on the same process. Here is someone else who had the same issue.
If your intention is to create multiple windows (mine was not) and you want to know how, then see this thread (a few months out-of-date... not sure if the mentioned features are still in preview or not as of time of posting).
I'm developing a vsto outlook plugin and works perfectly when I run on debug mode. If I install it, it's always disabled automacally and I can't make it work.
Does anybody knows what's happening or could I do to figure out what's the problem?
We have encountered times when our Chem4Word add in has been hard disabled. This may have caused by pressing the stop button in visual studio during debugging! This makes word think the add in has crashed. In our case it was only apparent when trying to run it as an installed add in, running in visual studio IDE never showed an issue.
See here for instructions on how to clear any hard disabled add ins
https://learn.microsoft.com/en-us/visualstudio/vsto/how-to-re-enable-a-vsto-add-in-that-has-been-disabled?view=vs-2019
I think that this applies to all versions of office.
You can also look in the registry at
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Word\Resiliency\DisabledItems
Substitute your target application and version number as appropriate.
The key should not have any items if nothing in hard disabled.
I'm trying to debug a DLL that I've written in VB.Net. When the external program starts, it loads the DLL and everything runs fine...but I cannot see the class variables in the Locals pane. They show up blank as shown below.
Also, some lines of code generate the error "There is no source code available for the current location", but I think I understand why. Whenever it tries to step into class members of any of the Microsoft DLLs, it would of course have no information for those. But any lines which deal only in code that I've written, it works fine.
This is a COM DLL AddIn for Microsoft Access 2007, but I'm assuming the issue is roughly the same regardless of the type of DLL. The Shared COM Addin Wizard was used to get started, and then customization proceeded from there with satisfactory results...except for the invisible variables in the Locals window.
I'm new to writing & debugging a DLL like this; until now I've only done EXE files. I've researched MSDN, Google, and Stack Overflow, and here are the details that are asked about on other threads...
Visual Studio 2008, .Net 3.0, and Access 2007
Project Properties > Debug > External Program points to MSAccess.exe.
Project configuration is set for Debug.
Optimizations = off.
Generate debug info = Full.
The PDB file is present in the \bin\ folder with the DLL.
Breakpoints are working.
Debug.Print messages are working.
I dug through the registry and found all references to the project, DLL, and its custom UserControl (required since the project creates a CustomTaskPane, and all path paths point to \bin\ folder.
What am I doing wrong?
What am I doing right?
What can I improve?
Ok, answering part of my own question. I think I fixed the error message "There is no source code available for the current location". In the project properties "Enable unmanaged code debugging" was enabled.
With that option disabled, I can now step through the code without error, even if it hits objects for which I have no code. The debugger is acting a little differently too, but I haven't yet pinned it down. I did read up on the differences between managed & unmanaged code, and debugging them in mixed combinations, but while I understand in principle, I don't yet understand in practice.
My local variables are still blank, though.
Alright, after working on this for days in between other projects, I have an answer...of sorts. I think the solution and/or projects had become corrupt. I'll pass along what I can in the hope it may help others.
Yesterday I had a marathon session of "click everything", in the project settings and Options > Debugging, but nothign helped. At some point I stopped fiddling with the debug settings and continued working on the code until I was tired and went home.
This morning with a fresh mind I tried again, and discovered the private class variables were now all visible. And I don't know why. Also, there was a new problem: the Just-In-Time debugger prompt kept popping up, even thought it wasn't enabled in the settings:
Also, the play/stop/step toolbar buttons would become disabled when they shouldn't be, yet the menu selections for the same items functioned normally.
I double-checked all settings again. I played with everything and could NOT get the local class variables to become invisible again, and could not get the JIT dialog to go away.
So I...
Made a copy of the solution folder.
Cleaned the solution.
Rebuilt the solution, including the Setup project.
Uninstalled the Setup project from Windows via Solution Explorer.
Cleaned the solution again.
Deleted the SUO file.
Deleted everything in \bin\ and \debug.
Rebuilt the solution, including the Setup project.
And still the problems persisted.
After the JIT prompt, I clicked Continue (F5), then closed MSAccess. Aafter execution stopped, some IDE panes (such as Explorer, Locals, etc) disappeared, and some flew around to random locations on the screen. It was then I decided something might be corrupt, and started making plans to uninstall/reinstall all of Visual Studio 2008 from scratch, and possibly even a new solution from scratch.
So before reinstalling, I tried creating a new solution from scratch, and found everything worked perfectly, even with all settings as they were from the original solution.
So in the original solution I...
Exported the settings from Tools > Import and Export Settings.
Reset all settings.
Imported the settings I just saved.
At the moment the import dialog closed, I received the error message: "An unexpected error has occurred".
When restarting the VS IDE, I received a dialog that said "Visual Studio is configuring the environment for first time use". That didn't sound good.
Tried importing the settings again, same error.
Rebooted, tried importing again, same error.
Closed the Solution file, tried importing the settings again without any solution open, and it worked....or seemed to.
Then opened the Solution...and same problems were back.
Exported the settings from the new Solution.
Imported those settings into the original solution...and it's fixed..?
There was no import error, and the project started working correctly..!!
The local class variables were visible, and the JIT prompt was gone..!!
So...I guess something was bunged up in the Solution, one of the Projects, the IDE settings, or...something. I hope this helps someone else.
I am working on an ArcGIS add-in (a very simple toolbar with a few buttons) with VB.Net and ArcObjects SDK in Visual Studio 2010. The solution was built successfully and the debug settings were configured.
When I hit Debug, ArcMap application was opened. I couldn't find the toolbar docked anywhere on the ArcMap toolbar. I went to "Customize" -> "Add-in Manager" and the add-in being debugged was not there. Then I tried "Add From File...", located the "esriaddin" file and clicked "Install Add-in". It populated a message box saying "No GUI components found in this Add-In."
I made some Google searches but haven't got any luck to reach a solution yet.
What was I missing? Has anyone come across the same issue and any direction?
Thanks in advance!
Try clicking build first, then open the arcmap separately and check the add-in manager inside of arcmap to see if it got added to the application. If so, you should be able to find it and turn the toolbar on.
I'm not sure about .Net, but I debugged this issue for the Java SDK. You have to make sure you are using the correct versions for compiling. In java, it was an old archive version of jdk1.6 32 bit.
Then I was referencing something wrong inside the xml document. I had changed the name of my JAR file (taken from project name by the ArcObjects SDK). In the xml document it was still pointing towards the old name.
This may not help you, but if anyone else searches this error and is using tje Java SDK, hopefully it will help.
I struggled with this same issue with a 10.0 add in. We had a 10.1 update that worked with 10.1 but trying to install it to 10.2.2 gave me that exact error. So much for upward compatible! I then tried to build 10.2.2 code and kept having this error. Others mentioned needing to build to x86 so I did that although the 10.1 was on Win7-64 and ran with AnyCPU....
I believe the final key for me was in the config file. I had set version to 10.2.2 As soon as I changed that to 10.2, the darn add-in installed just fine. Nice waste of a day for an extra '.2'
So, I just installed everything needed for MonoTouch on a MacBook running Lion.
I followed the steps/instructions to install (see here) and then created a new solution. When I open my xib-file I get the following error (in MonoDevelop):
Error updating Objective-C type information. Did not get project info
System.Exception: Did not get project info
at MonoDevelop.Macdev.XcodeSyncing.XcodeProjectTracker.UpdateTypes(IProgressMonitor monitor, Boolean force) [0x00029 in /Users/builder/data/lanes/monodevelop-mac-2.8.6.4/ca00645c/source/monodevelop/main/src/addins/MonoDevelop.MacDev/XcodeProjectTracker.cs:351
I have done nothing else than installiong Xcode, then the Framework/Runtime (MRE-2.10.8_3), then MonoDevelop (2.8.6.4) and then MonoTouch.
Anyone seen this before? I can't find a single thing in this specific error on the net.
It seems that I needed to close the solution, restart the program and then some form of "updating xcode"-thing was running. Then it worked with getting the designer up. Of course, I can't see the Assistant Editor and create those outlets, but that's another issue...
I fixed this issue by building the application, and then double clicking the xib file.
I fixed this issue by building the application, closing and reopening the solution, and then double clicking the xib file.