how to catch Yii CConsoleApplication warnings which was thrown by native php? - error-handling

I found that yii console application uses own handler to throw any errors or warnings but i need to catch some warnings or error but i can't.
How i can catch native warnings or errors incide my code ?
I just want to catch some of warnings and errors, some of them must be handled by Yii errorHandler()

I use NetBeans IDE to develop. I've activated XDebug in php.ini. With that in hand I am able to follow up errors, debug my Yii applications, watch variables and so on. Debugging PHP code.

Related

Using IntelliJ IDEA and the Dart plugin, where does the Dart exceptions end up?

I've been playing with Angular2 using IntelliJ IDEA (2016.3.5) and the latest Dart plugin, and I just can't figure out where the errors, exceptions, assert failures etc. ends up.
I am running Dartium with DART_FLAGS="--checked" and pub serve seems to default to debug mode as far as I can read. Dart2js is configured to run in checked mode as well and the analysis server is configured for strong mode. I have also tried using the JetBrains Chrome extension so I get everything shown directly in IDEA, including the console saying Observatory listening at http://127.0.0.1:35517/.
When there are no errors the Angular2 Dart app runs just fine in Dartium but if I add an assert some where in the code, ie. on a button trigger, the app just stops working at that point with no error output anywhere. Same goes if there's some other error somewhere that pub serve didn't detect.
Dart and Dartium are both at the currently latest version, 1.22.1.
This will be fixed in Angular3 beta.x due to be released the next days it seems.

Codeception won't run any tests. Fails with no errors, quits before running any tests

I go to run an acceptance test, but it only outputs
Codeception PHP Testing Framework v2.0.12
Powered by PHPUnit 4.5.1 by Sebastian Bergmann and contributors.
Then it quits with out any error message. No tests run, no error message.
Browser tests were working fine, and only acceptance tests were broken.
I have all ready solved the problem, but I want to create a record for next time I or any one else runs into this problem.
If you codeception is quitting without any errors or fail messages, it means that there is an error in your code somewhere. I found the error in me Acceptance Helper file, where I had a duplicate of a function. Functions can not have the same name in php, so everything fails. But codeception does not output any error messages.
In order to solve this problem, you need to look through your Helper functions to find a syntax error, or it could be in your actual tests.
The reason it fails is codeception hits an error in the php code, and dies, not throwing any errors. Leaving you confused and frustrated. Now you can find this question and get back to doing what you're doing.
YAY!
There is a syntax error somewhere in your testing code, find it and get rid of it, and it will work. I'd bet the error is in the AcceptanceHelper.php or Browser or what ever suit won't run tests.
If you're seeing this behaviour (codeception quits without any error messages) there is likely a fatal PHP error happening somewhere, but it's not necessarily in your own code or in your codeception generated files.
Depending on your PHP configuration, these errors should show up in an error log, even if they're not output to the console.
For example, if you're using MAMP on Mac, the error log is here by default: /Applications/MAMP/logs/php_error.log
Clear the PHP error log, run your (non-working) test, and check the log again. It should give more insight.
In my case, it was a matter of running codeception 4 on Laravel 5.5, and hence missing classes from the symfony/service-contracts package. Installing this package with composer moved past the "invisible" problem (though I ultimately had to downgrade to composer 3, since there doesn't seem to be a compatible set of symfony/Laravel 5.5/composer 4 packages).

Unable to debug Win 8 app using Mixed (Managed and Native) debugger

In a WinRT app when switching the debugger type to mixed (from managed), the application fails to start.. pausing the debugger shows execution is at:
static void Main(string[] args)
{
global::Windows.UI.Xaml.Application.Start((p) => new App());
}
The output window continually shows EETypeLoadExceptions as different memory locations:
First-chance exception at 0x757E4B32 in ApplicationName.exe: Microsoft
C++ exception: EETypeLoadException at memory location 0x0BF7D134.
It looks like the CLR exception is:
CLR:(C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll) Rejecting native image because native image dependency C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll had a different identity than expected
I need to use the Native debugger for SOS Debugging Extension (SOS.dll)
When creating a new blank app and then adding the same dependencies as my app, I don't experience the problem, so its something specific to my app.
Any ideas on what the issue is or how to troubleshoot further? Anyone with experience using SOS Debugging Extension (SOS.dll) with WinRT apps?
I had a managed application calling native COM objects that in turn call back some managed COM instances. At some point when a native COM was calling back a managed COM object EETypeLoadException was thrown.
It turned out that I had several assemblies in different projects with the same name (Common.dll). As all assemblies were unsigned .NET runtime could not load two different assemblies with the same name and reported the problem through EETypeLoadException.
I wish the diagnostics was more detailed but at least it's now resolved in my case.

WebView.Navigate results in unhandled exception

Using the WebView control in the Windows 8 SDK Samples results in an unhandled 'Unspecified error'.
In my own project it gives me an unhandled exception of 'Unable to get property '1' of undefined or null reference'.
I can't catch it.
It doesn't happen if I deploy it to a Surface or on another machine so I think it's probably my machine.
I need to know what I can do to fix this issue on my machine.
Any help appreciated.
When you debug a XAML app with a WebView whose content has a JavaScript exception, that exception is elevated up through the WebView to Visual Studio where you (presumably) can debug it. When you run this (CTRL+F5) without debugging, these types of errors are swallowed. So your experience is not your machine, but the fact that the debugger is attached.
You can find a similar question and its answer here: https://stackoverflow.com/a/12249831/265706 But beware that the answer to that question suggests disabling the debugging mechanism. Make sure that is what you really want to do.

URGENT:How to keep using SDK after IDE has been expired (FlashBuilder4Force.com)

I was using Flash builder for force .com IDE for my project but it has been expired.
Can I only use its SDK which I think should be free and compile my application using command prompt.
I know how to compile mxml applications from command line in simple flex application but for Force.com projects I am stuck.
I have copied all the swc in libs folder.
The compiler throws an error 'Error: could not resolve 'flexforforce:F3WebApplication' to a component implementation. '.
Can any one help me here? I don't know how to proceed from here :(
Thanks in advence.
You can see the true command-line parameters with the -dump-config option (see http://cookbooks.adobe.com/post_Compiling_Flex_libraries_with_Ant-16504.html)
Cheers