New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working on Linux #6
Comments
|
Do you have Editor Attaching enabled in Preferences / External Tools? Looks like the debugger finds Unity and then attached for like 4 seconds and then detaches. Could look like Editor Attaching is disabled. |
|
Well, i remove Unity and reinstall it and it worked. Editor Attaching is enabled. |
|
I see do. Do you have the same issue with MonoDevelop on Linux? I would report this issue on the Unity Linux forum: http://forum.unity3d.com/forums/linux-editor-support-feedback-experimental.93/ Closing this issue until it has been figured whether this is an issue with the Linux editor. |
|
Hi! I found solution. So easy solution is to open VSCode/Plugins/Editor/VSCode.cs find all EditorPrefs.SetBool("AllowAttachedDebuggingOfEditor" and comment it. After that Debug will work perfect. ps: sorry for my english |
|
@reapazor: See above. |
|
It is interesting that it is linux only .... My first instinct due to the limited exposure of this problem is to wonder about the whole requirement to restart. Is that no longer there on Linux? We used to get a warning message about changing those settings and requiring restart. Of course it's on a different section of the preferences when the plugin changes it. Maybe I should force restart the editor? Or present my own warning ... However, @ru-ace is indicating that restarting didn't resolve that ... I'm still not exactly sure what is causing this :( from an attachment point i'm just changing the preference flag ... @lukaszunity ideas? |
|
@reapazor Personally I would just not support chaning the preference and let the users control whether Editor Attaching should be enabled or not through the Preferences. I think we at Unity should revisit whether disabling editor attaching even makes sense. |
|
That creates the support nightmare of "why isnt it working" for some users. |
|
I could see if I could add an error message to the debugger extension when attaching to editor fails, sometime in the lines of "Unable to attach to Unity Editor. Is Editor Attaching in Preferences enabled?" |
|
That could work wonderfully :) It just seems odd that this is an edge case happening on Linux only, feels like something deeper. |
|
@reapazor I don't know how it should work at other operation system.
I think it good idea to enable "Editor Attaching" only in case when it need for plugin and disabled(in this case show warning that user must restart Unity), but in other cases don't touch this setting. |
|
Just to bring this discussion full circle (useful for lukaz) The problem was that the plugin has a feature which disables its changes on exit. I use this on a daily basis as #code cannot handle the size of some of my projects, so i have to revert to Xamarin. However what it does internally was revert the "Editor Attaching" part of Unity. This is where things breakdown as Unity needs a restart when its state changes, thusly the plugin changes it without forcing a restart. I've altered the repository version to simply always have it on, turn it on, and never turn it off. I can't see of a reason why it would never need to be off really. Lukaz - Is there something I can call if i were to be switching it that would reload what ever is necessary? or is this approach probably the safest for now. |
|
Due to the way Mono is initialized and used in Unity, the debugger must be initialized as part of the initial startup in Unity. A restart is therefore required when changing editor attaching. |
|
Hi I was having a similar issue of the debugger detaching after 5seconds on Ubuntu 18.04, I was able to solve the issue with installing mono - with these instructions https://www.mono-project.com/download/stable/ |
Hello i am trying this extension on Linux,
and in VS code i have the following error :
UnityDebug: Attached to Unity process 'Unity Editor (Unity)' (14215)
UnityDebug: Disconnected
The disconnected message arrive 5 second after the first one.
in the UnityDebug-log.txt, i have the following exception;
00:47:51.920004: Log
00:47:51.925793: UnityDebug
00:47:55.454226: iOS USB Error: System.TypeInitializationException: The type initializer for 'MonoDevelop.Debugger.Soft.Unity.Usbmuxd' threw an exception. ---> System.NotSupportedException: Platform not supported
at MonoDevelop.Debugger.Soft.Unity.Usbmuxd..cctor () <0x41c75880 + 0x000a3> in :0
--- End of inner exception stack trace ---
at MonoDevelop.Debugger.Soft.Unity.iOSDevices.get_Initialized () <0x41c75800 + 0x0000f> in :0
at MonoDevelop.Debugger.Soft.Unity.iOSDevices.GetUSBDevices (MonoDevelop.Debugger.Soft.Unity.ConnectorRegistry connectors, System.Collections.Generic.List`1 processes) <0x41c75510 + 0x00037> in :0
at MonoDevelop.Debugger.Soft.Unity.UnityProcessDiscovery.GetUnityiOSUsbProcesses () <0x41c753c0 + 0x00093> in :0
00:47:55.454396: Found Unity process: Unity Editor (Unity) (14215)
00:47:55.460939: UnityDebug: Attached to Unity process 'Unity Editor (Unity)' (14215)
00:47:59.967504: UnityDebug: Disconnected
I am on Linux Mint 17.3
mono version :
Mono JIT compiler version 4.2.2 (Stable 4.2.2.30/996df3c Fri Jan 22 00:02:19 UTC 2016)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
VS Code version:
Version 0.10.6
Commit a80232bbcfe8a5cdad1ebc98638673d9dcb02458
Date 2015-12-19T11:26:42.359Z
Shell 0.34.5
Renderer 45.0.2454.85
Node 4.1.1
Unity 3d version:
Version 5.3.1f1 (c128b18ee020) Personal
Wed, 06 Jan 2016 19:04:47 GMT
Branch: 5.3/linux/editor
If you need more information don't hesitate.
Regards,
Mathieu
The text was updated successfully, but these errors were encountered: