I'm using mono-2.6.7 and monodevelop-2.4, my OS is Windows 7.
I'm trying to implement a remote debugger for my own runtime (based on mono, mono is embedded in it, used lang - C#) in a way it's done by Novell for Moonlight.
Unfortunately, no success...
After clicking "Debug" in MonoDevelop:
IDE is put into debug state,
my runtime starts,
successfully sends DWP-Handshake to listening IDE
and then connection terminates and Debugging ends.
For some reasons (absolutely not clear for me) IDE doesn't send a handshake after recieving it from my runtime but simply terminates a connection.
The code i use is in another question: Can't use Mono Soft Debugger Remote Debugging because 'debugger-agent: DWP handshake failed' error
Does smb know if it can be done the save way it's done for Moonlight? Or it's it's impossible? Maybe there is another solution?
Prooved! It works. The problem was in unhandled exception thrown by VirtualMachineManager.ListenInternal(2) method in Mono.Debugger.Soft. More details here - Can't use Mono Soft Debugger Remote Debugging because 'debugger-agent: DWP handshake failed' error
Related
I run into the problem where VSCode prompts
Debug adapter process has terminated unexpectedly
For a C# project created using console template; when I debug it by pressing "F5" key.
I do not have any problems in compiling the project.
I have performed dotnet run on the project folder. I see the "Hello World" printed on the command prompt without any problem.
My version strings
VSCode : 1.14.2
dotnet : 2.0.0-preview2-25407-01
C# extn : 1.11.0
OS : Microsoft Windows NT 6.1.7601 Service Pack 1 (Windows 7 - 64 bit)
I do not have any info in event log.
How do I tackle this error?
[Update]
OmniSharp debug server is exiting/closing when they are launched suspiciously!
Where do I collect the log for the OmniSharp debug server?
I do not have anything printed on my Output window in VS Code. I do not even see OmniSharp log source in the Output filter dropdown.
[Additional information]
Noted same error when I run the application in non-debug mode as well using "Ctrl+F5" key.
Browsed VS Code's source code in github; the error message appears when debug server is not in disconnected state while exiting the server. Pursuing further on building a call graph, onServerExit are called
1. close event of the socket create in [connectServer] (https://github.com/Microsoft/vscode/blob/fbece01268f4e5d290a470b328eea6312069eda0/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts#L433)
2. exit event of the debug server process launched in [startServer] (https://github.com/Microsoft/vscode/blob/fbece01268f4e5d290a470b328eea6312069eda0/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts#L437)
Now my question gets refined to why is the debug server exiting / closing when they get created?
Could this be due to permissions or port numbers or something else? Where should I look for such problems in my machine?
When I change my Xamarin Android App from Debug to Release, the websocket starts throwing a WebsocketException: ConnectFailure (Access denied). However if I use it in 'debug' it works perfectly and handels the whole communication process within a few seconds.
Any idea why this might be happening? There are no #IF DEBUG statements in my code, also the app already worked fine a few weeks ago on Release.
Welp, sometimes problems get more obvious once you type them out. I had to add 'INTERNET' as a required permission to my app. No idea why it worked before, but that did the trick.
I have a WPF application(.net 4.0) which is working fine on Windows 7 systems. But when I try to run the application windows 8.1 it is working fine for 15 to 20 mins but after that suddenly a popup message is showing like
A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available
popup message showing with two options Debug and close program. When I press debug it is showing message as FatalExecutionEngineError detected
The runtime has encountered a fatal error. The address of the error was at 0x713543ed, on thread 0x23624. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.
if i press continue further showing message as
An unhandled exception of type 'System.ExecutionEngineException' occurred in PresentationFramework.dll
But i didn't get the exact reason why it is failing and which portion of code is causing the problem?
After searching over the net i have tried the following
Added DispatcherUnhandledException handler and App domain Unhandled exception handler and also added legacyUnhandledExceptionPolicy to . But nothing is works for me still facing the crash on Windows 8.1
Can someone point me how to detect the code portion which causing the crash? and How to handle FatalExecutionEngineEror exception?
EDIT
CLR version Used in both windows 7 and 8.1 is 4.0.30319
Few lines program perfectly works if running with ctrl+F5 (not debugging) but throws exception when running with F5 (debugging):
private static void Main(string[] args)
{
IWebDriver driver = new ChromeDriver(#"C:\Program Files (x86)\ChromeDriver");
This statement throws "No connection could be made because the target machine actively refused it" exception with no inner exception.
Again, it works perfectly with ctrl-f5
Windows 7 x64
VS 2012
Using Selenium WebDriver NuGet Packcge 2.35 (latest)
Using ChromeDriver.exe (v2.4.226107) (latest)
All firewalls and antivrus etc was killed.
Running VS as admin and UAC turned off
Why is this difference between debugging and running without debugging?
(I know that debugger has a host process please do not explain that)
How can I run this simple program in debug mode?
Any ideas?
Thx in advance
Thanks for all who spent time with reading and thinking about this question.
I've solved it. Well, it's a stupid thing but I am pretty sure that similar questions here complaining Selenium WebDriver and
"No connection could be made because the target machine actively refused it" exception
has this resolution, and other answers there missed the correlation between the issued solved and taken actions. Most of them suggest use other version of ChromeDriver.exe and talking about version incompatibility and ChromeDriver.exe bugs.
I think (at least my case) these resolutions are false.
The "error" comes from the WebDriver assembly and not about ChromeDriver.exe. I've examined the source of WebDriver, here it is:
while (!processStarted && DateTime.Now < timeout)
{
try
{
request.GetResponse();
processStarted = true;
}
catch (WebException)
{
}
When the DriverService class starts the ChromeDriver.exe immediately starts polling it with requests. Because it takes time the process to start, the port is not open for the first few dozen try... (at least a Sleep(10) or Sleep(50) would be nice here, but anyway)
Now the point: If you are so unlucky, you not checked the VS 2012 Options/Debug/General 'Enable Just My Code' and you checked the Debug/Exceptions/Thrown then debugger will break by this exception, but of course you will not see the source, the exception line will be your line
IWebDriver driver = new ChromeDriver(#"C:\Program Files (x86)\ChromeDriver");
Depending on timing (process start), you can get couple repeated time, and you will think your port, firewall, ChromeDriver.exe version, etc has to do with the exception.
I had this error at one point as well..and after hours of debugging..finally got the real error to show...my view for the I.E. browser was set at 125%...and when I changed it back to 100%...it worked. :)
As the title says, VS2008 keeps crashing on me whenever I debug a project when a certain form is open. I attached another VS2008 instance to it and found the following exception to be the culprit:
System.Runtime.InteropServices.COMException occurred
Message="Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))"
Source="mscorlib"
ErrorCode=-2147418113
StackTrace:
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.VisualStudio.NativeMethods.ThrowOnFailure(Int32 hr, Int32[] expectedHRFailure)
InnerException:
The problem I'm having is that I have no idea why this would happen. We use a few COM components (this is an old version of software I'm updating), but they don't cause any exceptions when the program is actually running, or when viewing design view normally. Only when I debug when the form is open. The program itself runs fine when debugging after VS's crash, but Visual Studio itself is hosed.
I know the simplest answer is to "make sure that form is closed!" but it takes forever to load and it's a much smoother workflow to keep it open (plus, I don't always remember to close it!)
So, has anyone run into this? Does anyone have any ideas why this might be happening?
You could try to 'refresh' you IDE istallation by command line:
devenv.exe /setup
/setup - Forces Visual Studio to merge resource metadata that describes menus, toolbars, and command groups, from all VSPackages available.
or run it with detailed logging to see what's happened:
devenv.exe /log
/log - Starts Visual Studio and logs all activity to the log file.
See MSDN: Devenv Command Line Switches for the rest of supported Visual Studio IDE switches