{"action":"created","issue":{"url":"https://api.github.com/repos/esp8266/Arduino/issues/2854","repository_url":"https://api.github.com/repos/esp8266/Arduino","labels_url":"https://api.github.com/repos/esp8266/Arduino/issues/2854/labels{/name}","comments_url":"https://api.github.com/repos/esp8266/Arduino/issues/2854/comments","events_url":"https://api.github.com/repos/esp8266/Arduino/issues/2854/events","html_url":"https://github.com/esp8266/Arduino/issues/2854","id":200478788,"number":2854,"title":"Documentation error in Arduino/doc/Troubleshooting/debugging.md ?","user":{"login":"PaulChristopher","id":1528578,"avatar_url":"https://avatars.githubusercontent.com/u/1528578?v=3","gravatar_id":"","url":"https://api.github.com/users/PaulChristopher","html_url":"https://github.com/PaulChristopher","followers_url":"https://api.github.com/users/PaulChristopher/followers","following_url":"https://api.github.com/users/PaulChristopher/following{/other_user}","gists_url":"https://api.github.com/users/PaulChristopher/gists{/gist_id}","starred_url":"https://api.github.com/users/PaulChristopher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaulChristopher/subscriptions","organizations_url":"https://api.github.com/users/PaulChristopher/orgs","repos_url":"https://api.github.com/users/PaulChristopher/repos","events_url":"https://api.github.com/users/PaulChristopher/events{/privacy}","received_events_url":"https://api.github.com/users/PaulChristopher/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-01-12T21:03:04Z","updated_at":"2017-01-17T15:26:58Z","closed_at":"2017-01-17T02:14:07Z","body":"The HelpOnDebugging https://github.com/esp8266/Arduino/blame/master/doc/Troubleshooting/debugging.md\r\n\r\ngives an example for developpers, how to debug an application, see code snippet line 83 onwards.\r\n\r\nThe code introduces a define\r\n```\r\n#ifdef DEBUG_ESP_PORT\r\n#define DEBUG_MSG(...) DEBUG_ESP_PORT.printf( __VA_ARGS__ )\r\n#else\r\n#define DEBUG_MSG(...) \r\n#endif\r\n```\r\n\r\nHowever the setup function initialised the debug serial as follows\r\n```\r\n\r\nvoid setup() {\r\n    Serial.begin(115200);\r\n    DEBUG_MSG(\"bootup...\\n\");\r\n    ....\r\n}\r\n```\r\n\r\nShouldn't it be like this?\r\n\r\n```\r\nvoid setup() {\r\n  #ifdef DEBUG_ESP_PORT\r\n    DEBUG_ESP_PORT.begin(74880);  \r\n  #endif\r\n  DEBUG_MSG(\"bootup...\\n\");\r\n   ....\r\n}\r\n```\r\nMoreover wouldn't it be better to use baud raute 74880 instead of 115200, since 74880 the default?\r\nI was always wondering about the gibberish between my debug message when using 115200.\r\n"},"comment":{"url":"https://api.github.com/repos/esp8266/Arduino/issues/comments/273200680","html_url":"https://github.com/esp8266/Arduino/issues/2854#issuecomment-273200680","issue_url":"https://api.github.com/repos/esp8266/Arduino/issues/2854","id":273200680,"user":{"login":"PaulChristopher","id":1528578,"avatar_url":"https://avatars.githubusercontent.com/u/1528578?v=3","gravatar_id":"","url":"https://api.github.com/users/PaulChristopher","html_url":"https://github.com/PaulChristopher","followers_url":"https://api.github.com/users/PaulChristopher/followers","following_url":"https://api.github.com/users/PaulChristopher/following{/other_user}","gists_url":"https://api.github.com/users/PaulChristopher/gists{/gist_id}","starred_url":"https://api.github.com/users/PaulChristopher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaulChristopher/subscriptions","organizations_url":"https://api.github.com/users/PaulChristopher/orgs","repos_url":"https://api.github.com/users/PaulChristopher/repos","events_url":"https://api.github.com/users/PaulChristopher/events{/privacy}","received_events_url":"https://api.github.com/users/PaulChristopher/received_events","type":"User","site_admin":false},"created_at":"2017-01-17T15:26:58Z","updated_at":"2017-01-17T15:26:58Z","body":"Agreed, but this was not the main point of the bug report. Apparently, there seems to be a DEBUG_ESP_PORT variable which is set by the IDE to Serial or Serial1. Debug messages are therefore output with DEBUG_ESP_PORT.printf. Thus it should be DEBUG_ESP_PORT.begin and not Serial.begin in the example code, shouldn't it? "}}
{"actor":{"display_login":"PaulChristopher"}}