{"action":"created","issue":{"url":"https://api.github.com/repos/GordianDotNet/VSMonoDebugger/issues/3","repository_url":"https://api.github.com/repos/GordianDotNet/VSMonoDebugger","labels_url":"https://api.github.com/repos/GordianDotNet/VSMonoDebugger/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/GordianDotNet/VSMonoDebugger/issues/3/comments","events_url":"https://api.github.com/repos/GordianDotNet/VSMonoDebugger/issues/3/events","html_url":"https://github.com/GordianDotNet/VSMonoDebugger/issues/3","id":348101216,"node_id":"MDU6SXNzdWUzNDgxMDEyMTY=","number":3,"title":"X Server Support?","user":{"login":"TheColonel2688","id":8753759,"node_id":"MDQ6VXNlcjg3NTM3NTk=","avatar_url":"https://avatars3.githubusercontent.com/u/8753759?v=4","gravatar_id":"","url":"https://api.github.com/users/TheColonel2688","html_url":"https://github.com/TheColonel2688","followers_url":"https://api.github.com/users/TheColonel2688/followers","following_url":"https://api.github.com/users/TheColonel2688/following{/other_user}","gists_url":"https://api.github.com/users/TheColonel2688/gists{/gist_id}","starred_url":"https://api.github.com/users/TheColonel2688/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheColonel2688/subscriptions","organizations_url":"https://api.github.com/users/TheColonel2688/orgs","repos_url":"https://api.github.com/users/TheColonel2688/repos","events_url":"https://api.github.com/users/TheColonel2688/events{/privacy}","received_events_url":"https://api.github.com/users/TheColonel2688/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-08-06T22:19:34Z","updated_at":"2018-09-23T11:29:56Z","closed_at":null,"author_association":"NONE","body":"I am trying the following debug script\r\n\r\n```\r\nexport DISPLAY=:0\r\nX -nocursor -s 0 -dpms&\r\nmono --debugger-agent=address=0.0.0.0:$(MONO_DEBUG_PORT),transport=dt_socket,server=y --debug=mdb-optimizations $(TARGET_EXE_FILENAME) $(START_ARGUMENTS) &\r\n```\r\nThis results in the following error\r\n\r\n> System.UnauthorizedAccessException: Access to the path \"/etc/mono/registry/last-btime\" is denied.\r\n\r\nI also tried a sudo\r\n```\r\nexport DISPLAY=:0\r\nX -nocursor -s 0 -dpms&\r\nsudo mono --debugger-agent=address=0.0.0.0:$(MONO_DEBUG_PORT),transport=dt_socket,server=y --debug=mdb-optimizations $(TARGET_EXE_FILENAME) $(START_ARGUMENTS) &\r\n```\r\n\r\nwhich seems to result in the program not launching.\r\n\r\nEdit in Addition:\r\nThis is on an RPi 3 running raspbian\r\n "},"comment":{"url":"https://api.github.com/repos/GordianDotNet/VSMonoDebugger/issues/comments/423809674","html_url":"https://github.com/GordianDotNet/VSMonoDebugger/issues/3#issuecomment-423809674","issue_url":"https://api.github.com/repos/GordianDotNet/VSMonoDebugger/issues/3","id":423809674,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzgwOTY3NA==","user":{"login":"GordianDotNet","id":29804912,"node_id":"MDQ6VXNlcjI5ODA0OTEy","avatar_url":"https://avatars2.githubusercontent.com/u/29804912?v=4","gravatar_id":"","url":"https://api.github.com/users/GordianDotNet","html_url":"https://github.com/GordianDotNet","followers_url":"https://api.github.com/users/GordianDotNet/followers","following_url":"https://api.github.com/users/GordianDotNet/following{/other_user}","gists_url":"https://api.github.com/users/GordianDotNet/gists{/gist_id}","starred_url":"https://api.github.com/users/GordianDotNet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GordianDotNet/subscriptions","organizations_url":"https://api.github.com/users/GordianDotNet/orgs","repos_url":"https://api.github.com/users/GordianDotNet/repos","events_url":"https://api.github.com/users/GordianDotNet/events{/privacy}","received_events_url":"https://api.github.com/users/GordianDotNet/received_events","type":"User","site_admin":false},"created_at":"2018-09-23T11:29:56Z","updated_at":"2018-09-23T11:29:56Z","author_association":"OWNER","body":"3. Execute commands with elevated rights. (sudo)\r\n\r\n- You can only add the necessary programs via `sudo visudo`:\r\n```\r\n# User alias specification\r\nusername123 ALL=(ALL) NOPASSWD: /usr/bin/pkill, /usr/bin/mono, /usr/bin/X\r\n```\r\n\r\n- Pre debug script in VSMonoDebugger settings\r\n`pkill -f mono`\r\n\r\n- Debug script in VSMonoDebugger settings\r\n```\r\nexport DISPLAY=:0\r\nX -nocursor -s 0 -dpms&\r\nmono --debugger-agent=address=0.0.0.0:$(MONO_DEBUG_PORT),transport=dt_socket,server=y --debug=mdb-optimizations $(TARGET_EXE_FILENAME) $(START_ARGUMENTS) &\r\n```\r\nWorks for me without any additional scripts.\r\n\r\n4. System.IO.FileNotFoundException\r\n> `System.IO.FileNotFoundException: <Timeout exceeded getting exception details> occurred`\r\n\r\nI added this lines to your program and set a breakpoint to `Console.WriteLine($\"AssemblyName: {args.Name}\");`\r\n```\r\n[STAThread]\r\nstatic void Main()\r\n{\r\nAppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;\r\n...\r\n}\r\n\r\nprivate static System.Reflection.Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)\r\n{\r\nConsole.WriteLine($\"AssemblyName: {args.Name}\");\r\nreturn null;\r\n}\r\n```\r\nMono is missing a dll with name `UIAutomationWinforms, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f4ceacb585d99812`. But the exception is caught internally. I found a [git repository with the name UIAutomationWinforms](https://github.com/mono/uia2atk/tree/master/UIAutomationWinforms)\r\n\r\n5. Yes you have to ignore the exception via the Visual Studio window \"Debug / Windows / Exception Settings\"\r\n\r\n\r\nSo I can debug your WinForms application using the VSMonoDebugger. But the GUI is rendered on the Ubuntu desktop. But that should be fine."}}
{"actor":{"display_login":"GordianDotNet"}}