{"action":"created","issue":{"url":"https://api.github.com/repos/WebFreak001/code-debug/issues/71","repository_url":"https://api.github.com/repos/WebFreak001/code-debug","labels_url":"https://api.github.com/repos/WebFreak001/code-debug/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/WebFreak001/code-debug/issues/71/comments","events_url":"https://api.github.com/repos/WebFreak001/code-debug/issues/71/events","html_url":"https://github.com/WebFreak001/code-debug/issues/71","id":172961193,"number":71,"title":"fileBasename without extension","user":{"login":"ChristianRinn","id":10540226,"avatar_url":"https://avatars.githubusercontent.com/u/10540226?v=3","gravatar_id":"","url":"https://api.github.com/users/ChristianRinn","html_url":"https://github.com/ChristianRinn","followers_url":"https://api.github.com/users/ChristianRinn/followers","following_url":"https://api.github.com/users/ChristianRinn/following{/other_user}","gists_url":"https://api.github.com/users/ChristianRinn/gists{/gist_id}","starred_url":"https://api.github.com/users/ChristianRinn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChristianRinn/subscriptions","organizations_url":"https://api.github.com/users/ChristianRinn/orgs","repos_url":"https://api.github.com/users/ChristianRinn/repos","events_url":"https://api.github.com/users/ChristianRinn/events{/privacy}","received_events_url":"https://api.github.com/users/ChristianRinn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/WebFreak001/code-debug/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"WebFreak001","id":2035977,"avatar_url":"https://avatars.githubusercontent.com/u/2035977?v=3","gravatar_id":"","url":"https://api.github.com/users/WebFreak001","html_url":"https://github.com/WebFreak001","followers_url":"https://api.github.com/users/WebFreak001/followers","following_url":"https://api.github.com/users/WebFreak001/following{/other_user}","gists_url":"https://api.github.com/users/WebFreak001/gists{/gist_id}","starred_url":"https://api.github.com/users/WebFreak001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WebFreak001/subscriptions","organizations_url":"https://api.github.com/users/WebFreak001/orgs","repos_url":"https://api.github.com/users/WebFreak001/repos","events_url":"https://api.github.com/users/WebFreak001/events{/privacy}","received_events_url":"https://api.github.com/users/WebFreak001/received_events","type":"User","site_admin":false},"assignees":[{"login":"WebFreak001","id":2035977,"avatar_url":"https://avatars.githubusercontent.com/u/2035977?v=3","gravatar_id":"","url":"https://api.github.com/users/WebFreak001","html_url":"https://github.com/WebFreak001","followers_url":"https://api.github.com/users/WebFreak001/followers","following_url":"https://api.github.com/users/WebFreak001/following{/other_user}","gists_url":"https://api.github.com/users/WebFreak001/gists{/gist_id}","starred_url":"https://api.github.com/users/WebFreak001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WebFreak001/subscriptions","organizations_url":"https://api.github.com/users/WebFreak001/orgs","repos_url":"https://api.github.com/users/WebFreak001/repos","events_url":"https://api.github.com/users/WebFreak001/events{/privacy}","received_events_url":"https://api.github.com/users/WebFreak001/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-08-24T14:05:59Z","updated_at":"2016-08-26T18:07:38Z","closed_at":null,"body":"First of all thank you very much for this plugin. This is not a bug but a feature request (closely related to https://github.com/Microsoft/vscode/issues/1104). \r\n\r\nI've managed to debug embedded applications with the following launch.json config (on Linux). Maybe you can add it to the readme, so if others wanted to do similar stuff, they would get it working faster.\r\n\r\n{\r\n    \"version\": \"0.2.0\",\r\n    \"configurations\": [\r\n        {\r\n            \"name\": \"Debug\",\r\n            \"type\": \"gdb\",\r\n            \"gdbpath\": \"arm-none-eabi-gdb\",\r\n            \"request\": \"attach\",\r\n            \"cwd\": \"${workspaceRoot}\",\r\n            \"executable\": \"${cwd}/blink.elf\",\r\n            \"target\": \"localhost:3333\",\r\n            \"remote\": true\r\n        }\r\n    ]\r\n}\r\n\r\nThe one thing that bothers me though, is that you can not use ${fileBasename} as a variable for the executable (blink.elf in my case) because it includes the extension (.c) as well.\r\nI think it should be something like\r\n`\"executable\": \"${cwd}/${FileBasenameNoExt}.elf\"`\r\n\r\nThere is already a supposal for this (including code) here:\r\nhttps://visualstudio.uservoice.com/forums/293070-visual-studio-code/suggestions/8945725-add-filebasenamenoext-to-tasks-json-variables\r\n\r\nWould be awesome if you could implement that as a custom variable for code-debug, since the upstream issue does not seem to be as important to be resolved but for debugging I think it would be great."},"comment":{"url":"https://api.github.com/repos/WebFreak001/code-debug/issues/comments/242808764","html_url":"https://github.com/WebFreak001/code-debug/issues/71#issuecomment-242808764","issue_url":"https://api.github.com/repos/WebFreak001/code-debug/issues/71","id":242808764,"user":{"login":"ChristianRinn","id":10540226,"avatar_url":"https://avatars.githubusercontent.com/u/10540226?v=3","gravatar_id":"","url":"https://api.github.com/users/ChristianRinn","html_url":"https://github.com/ChristianRinn","followers_url":"https://api.github.com/users/ChristianRinn/followers","following_url":"https://api.github.com/users/ChristianRinn/following{/other_user}","gists_url":"https://api.github.com/users/ChristianRinn/gists{/gist_id}","starred_url":"https://api.github.com/users/ChristianRinn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChristianRinn/subscriptions","organizations_url":"https://api.github.com/users/ChristianRinn/orgs","repos_url":"https://api.github.com/users/ChristianRinn/repos","events_url":"https://api.github.com/users/ChristianRinn/events{/privacy}","received_events_url":"https://api.github.com/users/ChristianRinn/received_events","type":"User","site_admin":false},"created_at":"2016-08-26T18:07:38Z","updated_at":"2016-08-26T18:07:38Z","body":"I don't know where exactly it is coming from but it is implemented for launch.json as well as tasks.json. For all other variables that are built in you can have a look here:\r\nhttps://code.visualstudio.com/docs/editor/tasks#_variable-substitution\r\n\r\nThe thing though with ${fileBasename} is that it is implemented through the node.js function path.basename which in turn follows the (irritational) behaviour of the shell and returns the whole filename including the extension. So if my file I want to debug is located in \"/my/path/to/my/source.c\", ${fileBasename} will return \"source.c\" instead of \"source\". It used to return the whole path on Linux (and maybe OS X as well) which seems to be standard nodejs behaviour but that was not intended and though was considered a bug in vs-code and fixed (https://github.com/Microsoft/vscode/issues/6623).\r\n\r\nA nodejs function that strips away the extension is already there:\r\nhttps://nodejs.org/api/path.html#path_path_basename_path_ext\r\n\r\nI just stumbled about an implementation of it in another vs-code addon:\r\nhttps://github.com/emeraldwalk/vscode-runonsave/blob/master/src/extension.ts#L174\r\n\r\nIf I only would know a little more about Typescript I would probably just have implemented it myself and send you a pull request but unfortunately this is a little bit too cryptic for me right now, sorry ;)"}}
{"actor":{"display_login":"ChristianRinn"}}