{"action":"created","issue":{"url":"https://api.github.com/repos/go-lang-plugin-org/go-lang-idea-plugin/issues/1744","labels_url":"https://api.github.com/repos/go-lang-plugin-org/go-lang-idea-plugin/issues/1744/labels{/name}","comments_url":"https://api.github.com/repos/go-lang-plugin-org/go-lang-idea-plugin/issues/1744/comments","events_url":"https://api.github.com/repos/go-lang-plugin-org/go-lang-idea-plugin/issues/1744/events","html_url":"https://github.com/go-lang-plugin-org/go-lang-idea-plugin/issues/1744","id":94564786,"number":1744,"title":"Run/Debug configuration: current file/package","user":{"login":"pierrre","id":131535,"avatar_url":"https://avatars.githubusercontent.com/u/131535?v=3","gravatar_id":"","url":"https://api.github.com/users/pierrre","html_url":"https://github.com/pierrre","followers_url":"https://api.github.com/users/pierrre/followers","following_url":"https://api.github.com/users/pierrre/following{/other_user}","gists_url":"https://api.github.com/users/pierrre/gists{/gist_id}","starred_url":"https://api.github.com/users/pierrre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pierrre/subscriptions","organizations_url":"https://api.github.com/users/pierrre/orgs","repos_url":"https://api.github.com/users/pierrre/repos","events_url":"https://api.github.com/users/pierrre/events{/privacy}","received_events_url":"https://api.github.com/users/pierrre/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-12T13:17:59Z","updated_at":"2015-07-13T01:37:52Z","closed_at":null,"body":"Can we use the current file/package instead of a specific one in a run/debug configuration?\r\n\r\nThe \"file watcher\" plugin allows to use variable/macro like `$FilePath$`."},"comment":{"url":"https://api.github.com/repos/go-lang-plugin-org/go-lang-idea-plugin/issues/comments/120781201","html_url":"https://github.com/go-lang-plugin-org/go-lang-idea-plugin/issues/1744#issuecomment-120781201","issue_url":"https://api.github.com/repos/go-lang-plugin-org/go-lang-idea-plugin/issues/1744","id":120781201,"user":{"login":"zolotov","id":140920,"avatar_url":"https://avatars.githubusercontent.com/u/140920?v=3","gravatar_id":"","url":"https://api.github.com/users/zolotov","html_url":"https://github.com/zolotov","followers_url":"https://api.github.com/users/zolotov/followers","following_url":"https://api.github.com/users/zolotov/following{/other_user}","gists_url":"https://api.github.com/users/zolotov/gists{/gist_id}","starred_url":"https://api.github.com/users/zolotov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zolotov/subscriptions","organizations_url":"https://api.github.com/users/zolotov/orgs","repos_url":"https://api.github.com/users/zolotov/repos","events_url":"https://api.github.com/users/zolotov/events{/privacy}","received_events_url":"https://api.github.com/users/zolotov/received_events","type":"User","site_admin":false},"created_at":"2015-07-13T01:37:52Z","updated_at":"2015-07-13T01:37:52Z","body":"We can do this but it's quote questionable feature.\r\n\r\n> The \"current file\" is always the active tab.\r\n\r\nFor example, what if you run configuration without any opened file? Or what if you have already run configuration and then open another file (e.g. run tests and then fix implementation), then how you tell IDE what you want rerun the old configuration or run current file?\r\n\r\n> Build: run go build on the current file package\r\n\r\nPlace caret on package statement in file and Ctrl+Shift+R (ctrl+shift+f9 on linux). After that you can rerun it via popup (Cmd+Alt+R) or cmd+4 to focus run tool windows and then Cmd+R for rerun.\r\n\r\n> Run: exec the generated binary (same name as the package); if there is no binary, the action fails\r\n\r\nWhat binary?\r\n\r\n> Build and Run: just a shortcut for Build + Run\r\n\r\nThe same Ctrl+Shift+R, depends on where caret is placed package or file will be build and run.\r\n\r\n> File Run: run go run on the current file\r\n\r\nCtrl+Shift+R in file with main function\r\n\r\n> Test: run go test on the current package\r\n\r\nCtrl+Shift+R on package statement, or in file, or in test method for running test"}}