{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/311","labels_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/311/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/311/comments","events_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/311/events","html_url":"https://github.com/Microsoft/visualfsharp/issues/311","id":62767514,"number":311,"title":"FSC and FSI usage text and code comments inaccurate regarding debug defaults","user":{"login":"latkin","id":5943573,"avatar_url":"https://avatars.githubusercontent.com/u/5943573?v=3","gravatar_id":"","url":"https://api.github.com/users/latkin","html_url":"https://github.com/latkin","followers_url":"https://api.github.com/users/latkin/followers","following_url":"https://api.github.com/users/latkin/following{/other_user}","gists_url":"https://api.github.com/users/latkin/gists{/gist_id}","starred_url":"https://api.github.com/users/latkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/latkin/subscriptions","organizations_url":"https://api.github.com/users/latkin/orgs","repos_url":"https://api.github.com/users/latkin/repos","events_url":"https://api.github.com/users/latkin/events{/privacy}","received_events_url":"https://api.github.com/users/latkin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/visualfsharp/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/Microsoft/visualfsharp/labels/up%20for%20grabs","name":"up for grabs","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-18T18:32:07Z","updated_at":"2015-03-21T00:13:06Z","closed_at":null,"body":"Both FSI and FSC print the following usage info for the `--debug` flag:\r\n\r\n```\r\n                - CODE GENERATION -\r\n--debug[+|-]                   Emit debug information (Short form: -g)\r\n--debug:{full|pdbonly}         Specify debugging type: full, pdbonly. ('full' is the default and enables attaching a\r\n                               debugger to a running program).\r\n```\r\nIt says `full` is the default debug setting.  However this is not true, either in FSC or in FSI.\r\n\r\n(note that `-g` ==  `--debug+` == `--debug:full`)\r\n\r\n-----\r\n\r\nIn FSC the [relevant code](https://github.com/Microsoft/visualfsharp/blob/fsharp4/src/fsharp/fsc.fs#L322-L325) reads:\r\n\r\n```fsharp\r\n    // Preset: --optimize+ -g --tailcalls+ (see 4505)\r\n    SetOptimizeSwitch tcConfigB On\r\n    SetDebugSwitch    tcConfigB None Off\r\n    SetTailcallSwitch tcConfigB On \r\n```\r\nThe call to `SetDebugSwitch` is actually equivalent to `--debug-`, so both the usage text and the comment are incorrect.\r\n\r\n-----\r\nIn FSI the [relevant code](https://github.com/Microsoft/visualfsharp/blob/fsharp4/src/fsharp/fsi/fsi.fs#L2147-L2150) reads:\r\n\r\n```fsharp\r\n    // Preset: --optimize+ -g --tailcalls+ (see 4505)\r\n    do SetOptimizeSwitch tcConfigB On\r\n    do SetDebugSwitch    tcConfigB (Some \"pdbonly\") On\r\n    do SetTailcallSwitch tcConfigB On  \r\n```\r\nThe call to `SetDebugSwitch` is actually equivalent to `--debug:pdbonly`, so both the usage text and the comment are incorrect\r\n\r\n-----\r\n\r\nWe should either\r\n- Modify the true defaults so they match the documentation/comments\r\n- Modify the documentation/comments so they match the true defaults"},"comment":{"url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/comments/84201109","html_url":"https://github.com/Microsoft/visualfsharp/issues/311#issuecomment-84201109","issue_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/311","id":84201109,"user":{"login":"jwood803","id":1578160,"avatar_url":"https://avatars.githubusercontent.com/u/1578160?v=3","gravatar_id":"","url":"https://api.github.com/users/jwood803","html_url":"https://github.com/jwood803","followers_url":"https://api.github.com/users/jwood803/followers","following_url":"https://api.github.com/users/jwood803/following{/other_user}","gists_url":"https://api.github.com/users/jwood803/gists{/gist_id}","starred_url":"https://api.github.com/users/jwood803/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwood803/subscriptions","organizations_url":"https://api.github.com/users/jwood803/orgs","repos_url":"https://api.github.com/users/jwood803/repos","events_url":"https://api.github.com/users/jwood803/events{/privacy}","received_events_url":"https://api.github.com/users/jwood803/received_events","type":"User","site_admin":false},"created_at":"2015-03-21T00:13:06Z","updated_at":"2015-03-21T00:13:06Z","body":"Awesome! I'll submit it later tonight.\n\n-----Original Message-----\nFrom: \"Lincoln Atkinson\" <notifications@github.com>\nSent: ‎3/‎20/‎2015 7:48 PM\nTo: \"Microsoft/visualfsharp\" <visualfsharp@noreply.github.com>\nCc: \"Jon Wood\" <woodjon@gmail.com>\nSubject: Re: [visualfsharp] FSC and FSI usage text and code commentsinaccurate regarding debug defaults (#311)\n\n@jwood803 sure, that's fine to get it started before the CLA is done\n—\nReply to this email directly or view it on GitHub."}}