I am trying to debug this Mono desktop software in Monodevelop.
I imported the SLN file, ran Build all with success, but when I press the Debug button I get this popup that stays waiting forever saying Waiting for debugger:
The output says:
User assembly '/home/nico/src/SparkleShare/SparkleShare/bin/SparkleShare.exe' is missing. Debugger will now debug all code, not just user code.
My first line of code is a Console.WriteLine whose output does not appear anywhere.
Am I doing something wrong?
Monodevelop 3.0.3.2 on Ubuntu 2012.10.
Nothing special appears on the console with monodevelop -v -v -v.
When I press Start Without Debugging instead of Start Debugging, the app crashes immediately saying The application exited with code: 255, but I need Debug to find where the problem is.
When I press Debug Application... and select bin/SparkleShare.exe, Monodevelop does nothing. The UI does not react in any way, it is like I pressed nothing.
When I run the application from command line, it runs fine (no crash), but Monodevelop does not react in any way, so I can't use it to debug:
mono --debug bin/SparkleShare.exe
Debugging in Monodevelop works fine with a solution created from scratch.
Here is a hack to debug in Monodevelop that works here, but it is quite painful, and unsupported.
Note: It is not the same problem as this question, which is about MonoTouch waiting for a phone simulator... the suggestions over there are about the simulator or updating XCode... no simulator nor XCode here.
MonoDevelop 2.8.6.3 is kinda old.
I recommend you upgrading to 3.x or even the master branch, which has a lot of improvements and probably fixes your issue.
Related
I recently upgraded some Firebase packages in my iOS Xamarin app, and now the thing refuses to work. The app opens (shows a splash screen) and immediately closes without producing an error.
While I want to fix the package problem, I have no clue where to start. I set a breakpoint on the App.xaml.cs constructor, but this never gets hit when I run the iOS version. So my next idea was to read the output like I do on Android.
I've been Googling around for a few hours, and everyone seems to say 'Go to Debug > Open System Log...', but this is absolutely rubbish! The system log seems to show everything except for my app running... (E.g. I run the app in the simulator, reload the system logs, and the freshest thing is from 10 minutes ago...)
I'm at my wits end here. Does anyone know a trick for viewing my app output in the simulator? Even just an exit code would be useful 😥
You could view the logs in these locations:
Mac – ~/Library/Logs/Xamarin/Simulator.Server
Windows – %LOCALAPPDATA%\Xamarin\Logs\Xamarin.Simulator
For the past months I have not been able to debug macOS or iOS apps through Xcode. What happens is the following:
Build and run app from Xcode.
Xcode says app is running, but no app has appeared and no debug output from app either.
Kill the process lldb-rpc-server.
App appears and runs as normal, but Xcode is no longer debugging.
Start a new debugging session by attaching it to the app's process.
App freezes again, until lldb-rpc-server is killed.
This OpenRadar has the same description.
I have tried re-installing Xcode (including command-line tools), but it didn't help. Any ideas?
Xcode: Version 9.3.1 (9E501)
MacOS: 10.13.4 (17E199)
The cause of this was that I had installed a GDB/LLDB-extension called Voltron. I was unaware that the installation also created/modified the .lldbinit in the home folder. Removing this file fixed the issue. See also this issue for Voltron.
Got some very good help from Apple.
I had received this warning msg when device was locked and I was running app on device, so when device is unlocked this warning goes
I have an app with a keyboard extension, and an iMessages extension. The main app debugs just fine, stops at breakpoints & allows stepping through code. The iMessage extension also works fine. The keyboard extension used to work fine with the debugger but ever since I installed XCode 8 it's been failing. It either fails to reach the breakpoint throwing a SIGABRT / SIGQUIT on thread 1, or it reaches the breakpoint and then crashes on the first 'step over' with a SIGQUIT.
I have Xcode 8.2.1 on OSX Sierra 10.12.3. I've tried my test device, iPhone 6, as well as the simulator. I've rebooted the dev box as well as the device. I've cleared the temporary files and cleaned the build (Shift+Command+Option+K and Shift+Command+K).
Has anyone else had any issues with debugger in XCode 8 and keyboard extensions?
TIA,
Mike
I encountered this bug from new Xcode (8.2.1) project. I found a temporary solution to debug my keyboard.
Run your code like always!
Bring up your keyboard until the error (SIGQUIT) appear!
Goto xcode > debug > detach
Goto again Xcode > debug > Attach to Process: attach the keyboard (it should be first process)
Now, your breakpoints will work. but there are no log output unfortunately!
I hope it temporary solve your problem.
So I'm trying to track down an issue that crops up when I'm NOT debugging with Xcode on the Apple watch, and I've discovered that the Apple Watch has some serious problems with console output if it wasn't launched via the debugger. Given the following code:
- (IBAction)onPrint:(id)sender
{
NSLog(#"############## Printing! ##################");
printf("************** Printf! ******************\n");
}
When launching via the debugger, it shows both lines in Xcode's console window. Great, no problems there.
If, however, I launch the watch app manually (from the watch itself), I get nothing in the console log via the devices window in Xcode, and nothing in the Console app on the mac (other than the normal "kernel[0] : prevent idle sleep list" messages the watch emits to the console from time to time).
I also tried connecting to the watch extension process using the Debug -> Attach to Process menu in Xcode, but it still won't print anything. Clear console, reload console... nothing works. I've looked all over SO for answers, and tried everything marked as an accepted answer or not, but nothing seems to work. This app is as simple as it can get: A single button that executes the code above to print to the console.
Is it just broken? Or is there some other arcane magic I must weave? I'm running Xcode 8.1 and WatchOS 3.1 on an Apple Watch 2.
It looks like this is just a limitation of WatchOS. The only way I've been able to get data back is by storing logs in a file and then fetching the file later.
Thing that can help you is called sysanalyse: you'll have to add special profile to both iPhone and Watch, and this will allow to see your app's logs in Console and via sysanalyse reports. Instructions and profiles are provided here.
If you are debugging background tasks, important to know: watchos's daemon will not terminate process what had already used it's background execution time limit if it is connected to debugger.
This is really odd because I was able to see log statements on the console. It's just now, I'm not. This is for Watch OS 6, xcode 11.2.1.
Xcode 4.2+ and Xcode 5 have a very powerful debugger for OpenGL ES. Until recently, the debugger itself would crash often (it didn't work reliably for me until Xcode5.0), but it sometimes disables itself and refuses to run at all.
This being an Apple application, they don't bother with error messages, they simply refuse to let you press the Analyze button:
I can't find any reference in Apple's docs to a situation that would "disable" the analysis. I know that it can work on this machine, because it worked fine on a different device.
Device that works:
iPad3, running iOS 6.x
Device that Xcode5 refuses to work with:
iPad Mini, running iOS 7.x
...I've tried updating to latest 7.x - no change. Xcode just refuses to work properly. All other debugging works fine.
It's not a perfect answer, but I've noticed something that might explain it...
When you pause the debugger, this triggers the button to grey-out. So, if you needed to analyse the frame at a particular point in your app ... you can't.
It sucks, and I have no idea how you're supposed to debug something without using the debugger, but ... it might be why I was getting disabled button!