For some reason, flutter in VS code stopped showing errors. No runtime or exception errors. Even when I put nulls everywhere on purpose, nothing shows in the console.
The red crash screen appears on device and emulators, but nothing with the details in console output. Not a single error. This image is what I am talking about, it's gone
Anybody ran into such a thing?
Thanks
In case anyone else stumbles upon this, I'll post my brain dead solution (insert face palm emoji). I couldn't figure out what was going on for a good 2-3 hours as I was getting zero output in the Debug Console tab in the terminal window. Turns out I had tried to filter the text using the filter text box. Since nothing was matching my filter text, it was showing nothing. Then I realized I had some text in the text box denoted below. Hopefully this solution saves someone else from some head scratching.
Another common cause of this, is using the filter box in debug console top right corner, if you typed something by mistake, it'll only show the words containing what you typed, and hide everything else. As mentioned by #jaredbaszler.
The code was passed down by another team mate, after inspecting the MyApp state, I found this in the initState, it was logging all error and not being shown in debug console.
#override
void initState() {
super.initState();
getLocale();
configLoading();
FlutterError.onError = (details, {bool forceReport = false}) {
sentry.captureException(
exception: details.exception,
stackTrace: details.stack,
);
};
}
After removing it,I was happy to see the errors and exactly where they were happening. I discovered this a couple of months ago, and posted the answer in case anybody might run into it. Now it seems easy and makes sense, but I missed it.
Related
I use HTML, CSS, and JavaScript mostly as I'm new to frontend development. The cursor is driving me crazy every time I am using VS code. I have disabled my format Pettier and JS-CSS-HTML and it still moves around. I am so confused and have tried multiple "solutions" of which none have worked. I'm sure it's a setting but I can't seem to find it. I wanted to put a video so someone could see the problem but can't only screen shots which I don't think will help. Let's take CSS => When I type #title-container {} the cursor just jumps out of the input brackets. Also the cursor won't let me add extra lines and returns the line after, back before I even get a chance to type anything.
Hopefully you understand this....
I am trying to adjust the UI in my game to properly fit on the screen of an iPhone X.
In my code I am attempting to code the line return Screen.safeArea
However 'safeArea' is highlighted red and when I hover over the error with my cursor a message is displayed saying "error CS0117: 'UnityEngine.Screen' does not contain a definition for 'safeArea'".
I dont understand why I'm getting this error because according to Unity's documentation UnityEngine.Screen does contain a definition for safeArea.
Any inclination or idea as to why I am running into this error?
Also, I am working with Unity 2017.2.0f3
As per comments bellow, code as been asked for.
private Screen ReturnSafeArea(){return Screen.safeArea}
as I tried saying, the code has nothing to do with it. Even in this simplistic instance of the use of Screen.safeArea, safeArea is listed as not a definition of UnityEngine.Screen.
Hovering over safeArea displays the following message
"'Screen' does not contain a definition for 'safeArea"
Screen.screenArea is of type Rect and your method is defined as returning a value of type Screen
https://docs.unity3d.com/ScriptReference/Screen-safeArea.html
One way to correct this:
private Rect ReturnSafeArea(){
return Screen.safeArea;
}
Additionally, the field was added in 2017.2.0p1 (Nov 6) and you're on 2017.2.0f3 (Oct 3). Link is for 0.2, but 0.f3 does not have its own page, so likely was made either the same day or very shortly after.
I believe Screen.safeArea was added in a minor release of 2017.2, so 2017.2.0f3 would not have it. Try your code in 2017.2.1 and newer to confirm. It's too bad the documentation doesn't specify that.
I understand the "android:initialLayout" element within the xml folder for defining the default layout of an Android homescreen widget. I want to be able to display a "loading your information" on my widget while I am waiting for data...how do I do this. I have tried to display an error message on my widget if there is no connectivity, but it doesn't get past the "android:initialLayout" , so showing code I believe is irrelevant. Correct me if I am wrong please...don't bash me. Any help greatly appreciated!
Yes, the initialLayout is so that your widget displays something before Android has had a chance to call your widget-updating code. This is a great place to put a "Loading..." message.
Once your onUpdate method is called in your widget, that is your chance to get your data. If you have a connectivity problem at that point, you can display an error message at that point. Otherwise, if you successfully get your data, then you can draw you widget with the data.
I'm not sure if I've answered your question, so apologies if I have not. Please clarify a bit more if I have not. The main questions I have are:
Is Android calling your onUpdate function? Log statements can be really helpful for this.
Are you trying to load your data in the background, such as a separate Service, and then reading the results in the widget? Or are you loading the data inside the widget?
I'm working on a project with a main window consisting of a mpartstack where I add parts dynamically from another part. The problem is that when the last part gets closed the mpartstack disappears and the other part takes up all the space. When I try to add new parts nothing happens.
I've tried fiddling around with the preDestroy function in the parts that are added to the stack by trying to add a new part. The preDestroy works occasionally but far from satisfactory.
I've looked far and wide to try to find any clue on what to do but I've found nothing except for some bug reports on the matter.
So: can a mpartstack be in a uncloseable state or is there any textbook way to intercept a part that is about to be closed?
Thanks in advance
/K
Add the tag NoAutoCollapse to the MPartStack definition in the model.
Background: I have been wanting a PickerView that is exactly matches that of Safari. I looked through many Gits and found none that work quite as exactly. I decided to build my own. It is complete now, but there is a bug that would not go away.
Problem: If you run the sample project you will be greeted with 2 text fields.
Tap on one of the textfields - it brings up the BTPickerView. Everything works just as you would expect.
Choose the fourth choice, then press done.
Tap on the same textfield. This time, the debug log will show you that you have executed an infinite loop, which freezes the app.
Question: What did I do to cause it? And how do I fix it?
I have tried everything to boil it down. It comes down to this and I could not go any further. Please advise.
Edit: Here is the sample code you can download in case anyone missed the blue link above.
The issue seems to be with the constraints in BTPickerLabel. If you temporarily disable the constraints from BTPickerLabel, code works fine. Enforcing constraint might trigger the reloading of entire picker view infinitely. I hope it should help you to fix the problem.