C
C#2d ago
iskander

✅ My MAUI android app keeps hitting a breakpoint. but only in debug mode.

So recently i've encountered this issue a while ago. before i used to just launch the app to windows and debug functionality there. but now i wanted to design the app and having the xaml live update is as far as i know only available if you launch the app with the debugger attached. the available clues: when i launch the app the page (which is a new preset MAUI page with no logic attached to it) seems to be created. yet, it isnt displayed yet before the breakpoint hits
No description
No description
3 Replies
iskander
iskanderOP2d ago
i've checked the callstack but sadly it's in external code so i cant debug it. the output log seems pretty useless. it says it failed to load some assembly but it then it says "it might've been loaded with fastDev"? idk
No description
No description
iskander
iskanderOP2d ago
what i've tried: -i tried to isolate the issue to a specific piece of code. i first started by loaded pages one at a time before just making a new page with nothing of note in it. and the issue still persists. i've checked and this is the only piece of code that gets ran that i authored. return new Window(new EmptyUselessClass()); -i tried to launch the app in my android phone but the issue is the same. so the emulator is not to blame here -i tried to make a whole new project and also run previous projects and the all run fine. this issue only exist in this damned project :( notes: -the issue only occurs when i launch the app in the debugger mode. hitting continue doesnt do anything. if i just start a new instance of the app it works all fine and dandy just like expected... -as i said before if i launch an instance of the app it works fine. so theoretically i could attach the debugger after the app launches 🤔 but it sounds like a workaround to a problem that might bite me in the ass later so i got the idea of just removing the old app and replacing it with a new MAUI project with the same name in the same solution file. long and behold the issue persists 🫠. UPDATE: turns out if i hit continue a bunch of times the app keeps running. it seems like the breakpoint hit everytime a view recomputes its size for one reason or another... ok i fixed by just moving the whole solution to another folder, make another solution with the same name and copy pasting the project files back :picard_facepalm:
MODiX
MODiX2d ago
If you have no further questions, please use /close to mark the forum thread as answered

Did you find this page helpful?