{"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":3,"created_at":"2018-08-06T22:19:34Z","updated_at":"2018-09-16T19:52:29Z","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/421821804","html_url":"https://github.com/GordianDotNet/VSMonoDebugger/issues/3#issuecomment-421821804","issue_url":"https://api.github.com/repos/GordianDotNet/VSMonoDebugger/issues/3","id":421821804,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTgyMTgwNA==","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-16T19:52:29Z","updated_at":"2018-09-16T19:52:29Z","author_association":"OWNER","body":"### 1. Problem:\r\n\r\n> I receive\r\n```\r\nUsage:\r\nkill [options] [...]\r\n```\r\n\r\nThe `kill`command should make sure that the last debug mono process is terminated in any case. Since Ubuntu is certainly not as limited as my embedded linux (Yocto). You can execute any kill command that causes a hanging mono debug process to terminate. \r\nSuggestion, if no further mono process is important, use the `pkill` command:\r\n`sudo pkill mono`\r\n\r\nYou can test the script if you start a mono process and in a second console window you can terminate it with `sudo pkill mono`.\r\n\r\n### 2. Question:\r\n\r\n> What is --debugger-agent=address=0.0.0.0 supposed to be? it is actually supposed to be 0.0.0.0?\r\n\r\nYes its works with `0.0.0.0`. See the answer from Stephen Kitt at the post [connecting-to-ip-0-0-0-0-succeeds-how-why](https://unix.stackexchange.com/questions/419880/connecting-to-ip-0-0-0-0-succeeds-how-why)\r\n\r\n> 0.0.0.0 as a target address refers variously to a non-routable host or to “this host”. In practice connecting to 0.0.0.0 is equivalent to connecting to localhost. (Strictly speaking it isn’t valid as a destination address, only as a source address, but practice doesn’t match theory.)\r\nWhen binding, “this host” expands to “any address on this host” — so applications commonly accept connections by binding to 0.0.0.0, which means they’ll receive packets addressed to any IPv4 address on the system.\r\n\r\nYou can get a short help for all mono debugger options:\r\n````\r\npi@raspberrypi:~ $ mono --debugger-agent=help\r\nUsage: mono --debugger-agent=[<option>=<value>,...] ...\r\nAvailable options:\r\n  transport=<transport>         Transport to use for connecting to the debugger (mandatory, possible values: 'dt_socket')\r\n  address=<hostname>:<port>     Address to connect to (mandatory)\r\n  loglevel=<n>                  Log level (defaults to 0)\r\n  logfile=<file>                File to log to (defaults to stdout)\r\n  suspend=y/n                   Whether to suspend after startup.\r\n  timeout=<n>                   Timeout for connecting in milliseconds.\r\n  server=y/n                    Whether to listen for a client connection.\r\n  keepalive=<n>                 Send keepalive events every n milliseconds.\r\n  setpgid=y/n                   Whether to call setpid(0, 0) after startup.\r\n  help                          Print this help.\r\npi@raspberrypi:~ $\r\n````\r\n\r\n### 3. Problem:\r\n\r\n> I can run the following script with a sudo directly in my VM. It seems X and Mono both need elevated privileges to run correctly\r\n```\r\n#!/bin/bash\r\nexport DISPLAY=:0\r\nX -nocursor -s 0 -dpms&\r\nmono ./start.exe&\r\n```\r\n\r\nChange your script like this (I used the default value for MONO_DEBUG_PORT = 11000) and run it manually. With the new VSMonoDebugger 0.7.6 you should be able to attach to this debug process (new menu: \"Attach to mono debugger (without SSH)\").\r\n\r\n```\r\n#!/bin/bash\r\nexport DISPLAY=:0\r\nX -nocursor -s 0 -dpms&\r\nmono --debugger-agent=address=0.0.0.0:11000,transport=dt_socket,server=y --debug=mdb-optimizations ./start.exe&\r\n```\r\n\r\nIf that works, you can try this as debug script:\r\n\r\n```\r\nexport DISPLAY=:0\r\nsudo X -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\n### 4. Problem\r\n>I can attach to the process from VS and it appears that an exception is thrown on the first line of the application. Which is\r\nApplication.ThreadException += Logic.Application_ThreadException;\r\nthis is just subscribing to an event, it does not fire the event yet. but a System.IO.FileNotFoundException: is thrown, which makes no sense, no file operation should happen there.\r\nIf I ignore it an hit continue my application, continues just fine.\r\n\r\nHow can you attach to the mono process with this script and without debugger-agent?\r\n```\r\n#!/bin/bash\r\nexport DISPLAY=:0\r\nX -nocursor -s 0 -dpms&\r\nmono ./start.exe&\r\n```\r\nTo fix this, I would have to have the logfile and possibly an example application. There may be a dependency (dll) missing here.\r\n\r\n### 5.Problem\r\n>However I have a new problem when I am debugging in windows I have the option to ignore an exception, there seems to be no option for that here. Should there be? This is a real problem as I have a lot a socket connection exception I need to ignore, as it is caught and handled. by upper level code.\r\n\r\nI have to investigate that. I think I was able to deactivate the exceptions. Is there an example program?\r\n\r\n"}}
{"actor":{"display_login":"GordianDotNet"}}