Trigger the mono soft debugger at runtime - mono

I can already debug easily using the soft debugger as a command line option (--debug --debugger-agent=transport=dt_socket,address=host:port) to mono when starting the app, but I want my program to continue if it can't find a debugger listening or better still for it to be told to connect to a specific monodevelop soft debugger later at runtime.
Looking at the Mono.Debugger.Soft API I think this could be possible, are there any examples?

Related

How to resolve error 0xc0000139

I'm developing a program on Widows10 with Qt. If I run it from the command line, it exits silently, immediately. When I try to debug it, a dialog box is displayed saying "During startup program exited with code 0xc0000139."
I know this means that Windows failed to load one or more DLLs.
How do I find which DLLs they were?
Ideally, I would prefer not to download any additional utilities beyond what is provided by Windows10 and Qt.
For what it's worth I resolved my problem.
It turned out the the program I was trying to run hadn't been rebuild since my last set of changes. I'm unsure why that was so, clearly my own error but I'm not sure what, precisely.
For the benefit of anyone coming here trying to find an answer to the question at the top of the page, if you have cygwin or another Unix-alike on your system, ldd is a good program with which to start looking through the sharable images you link to.

How to Use Intellij idea14.0.2 to Debug the golang?

The Debug button is disable, Shift+Alt+F9 will show this:
How to properly configure the debug page?
Update. The Go plugin supports Delve on Linux and Mac since September 2015 and on Windows since January 2016.
Original answer:
Currently we are dropping support for the debugger with gdb as it's very hard to use and unstable. Please see the go docs for gdb debugging
However, there are efforts in getting the open-source Delve debugger support for IDEs from which IDEA will benefit as well.
Please bug the Go team to support Delve or another debugger in order to have a stable solution and then integration with IDEA could be done.
thanks ,solved it.
Intellij Config is not right
The debug feature was introduced by issue 25, and commit 3a21e14
The correct way is to implement the debugger interfaces in inteliij and to hook them to a running gdb process.
(Here is an example of manually calling gdb to debug a Go program; using the options -c -gcflags '-N -l': not sure if the -l would matter as it is missing from the OP's screenshot "Go builder arguments")
It is possible the debug button is disabled if no gcc is configure for the Go debug process to use.
Note also that since PR 644:
"Debug" is disabled, if "Build Before run" is not enabled.
This should fix the problem, when gdb wants to run a not existing executable, because the outputDir is not set.

C++Builder XE3 needs to be restarted after each run in the debugger or app crashes on next run

This is kind of weird, and I only seem to be seeing this on Windows 7 (when I build the app in windows 8 this does not seem to be happening). I see this with C++Builder XE through XE3. I will compile an app (statically linking the packages and the rtl), and then run it from the debugger. If I then make a change to the code and try to recompile and run the app, the compile appears to go ok, but the app crashes when it tries to start. If I close C++Builder and reopen it, then force it to rebuild either by doing a rebuild all, or making a minor change it compiles and runs fine. This is the case every time. I have tried in the past to switch to dynamically linking the rtl and that "appeared" to make the problem go away but I am not sure if that is a solid assumption. Has anyone seen this behaviour, and does anyone know how to resolve it. It is getting tiresome to have to restart the IDE all the time.
Edit:
The crash happens before any of my code. Here is the call stack:
007d17b3; __delayLoadHelper2
007d7efa; __imageBase
007d308b; __wstartup
btw: there are no delay load dlls in this project.
According to the Embarcadero Forums, Try disabling "Incremental Linking".

VS.Net 2008 Windows 7 Debug Environment

I'm converting all of my Windows XP production applications to Windows 7 and I am having a couple of problems.
1: Whenever I get an error, on the XP machines, it breaks execution and stops on the line of code with the problem. In Windows 7, it just throws a generic exception and I have no idea where the line of code with the error took place. Very frustrating.
2: In XP, I can edit changes on the fly while I am running code if I place breakpoints or follow along the code. If I try that in Windows 7, it says that's not allowed with 64 bit applications. Again, very frustrating.
Any ideas for fixing these problems or at least working around them?
There shouldn't be any difference in the debugger's behavior between those two platforms, generally speaking. Here are my suggestions:
From your description, I can't ascertain whether or not the debugger did break on a first chance exception and it didn't find source (perhaps the symbols weren't found / were mismatched?) or if it didn't break at all. If the former, check "Debug -> Windows -> Modules" and verify that the symbols were loaded for the module in question. If the latter, perhaps the debugger on Windows XP was configured to break on a first chance exception while the debugger on Windows 7 was not? Compare the settings under "Debug -> Exceptions" to see if there are any differences. Note that if you have "Just My Code" enabled in "Tools -> Options -> Debugging -> General", this can also affect the breaking behavior of the debugger on first chance exceptions.
The Edit and Continue feature is not supported for 64-bit processes, so the debugger will notify you when you attempt to modify the source code when debugging a 64-bit process. This is likely the result of running an "AnyCPU" (my guess) or "x64" build of your application. The only way for edit and continue to work is to debug a 32-bit process; this can be accomplished by changing the target platform to "x86" in "Build -> Configuration Manager" (add the platform if it isn't in the list). This of course assumes your application is not dependent upon 64-bit modules.
Do you know roughly where the error is coming from? If so, and not already done, throw a generic try catch around it and break on the catch; then, examine the stack trace to see what line is generating the error.
Hope this helps.

Code build in Mac 10.4.4 is not working in 10.3.9?

I have build cocoa application in 10.4.4 using (mac10.3.9sdk xcode version:2.2.1,universal binary), but when im trying to invoke the application in 10.3.9 the application is not getting invoked.
Can you please tell me what would be the probable mistakes or reasons of its not getting invoked???or How can i trouble shoot the issue?
which version of xcode should i use in 10.3.9 so that i can debug the code, can someone please provide the corresponding link?
The runtime failure could be for any number of reasons: missing libraries or frameworks, compiled with the wrong settings etc.
Probably your first port of call should be console.app if you are trying to run this on another machine that does not have the development tools installed. It will probably give you some clues as to why the application isn't starting up.