{"action":"created","issue":{"url":"https://api.github.com/repos/desktop/desktop/issues/4562","repository_url":"https://api.github.com/repos/desktop/desktop","labels_url":"https://api.github.com/repos/desktop/desktop/issues/4562/labels{/name}","comments_url":"https://api.github.com/repos/desktop/desktop/issues/4562/comments","events_url":"https://api.github.com/repos/desktop/desktop/issues/4562/events","html_url":"https://github.com/desktop/desktop/pull/4562","id":318990416,"number":4562,"title":"Cleanup debug script","user":{"login":"shiftkey","id":359239,"avatar_url":"https://avatars2.githubusercontent.com/u/359239?v=4","gravatar_id":"","url":"https://api.github.com/users/shiftkey","html_url":"https://github.com/shiftkey","followers_url":"https://api.github.com/users/shiftkey/followers","following_url":"https://api.github.com/users/shiftkey/following{/other_user}","gists_url":"https://api.github.com/users/shiftkey/gists{/gist_id}","starred_url":"https://api.github.com/users/shiftkey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shiftkey/subscriptions","organizations_url":"https://api.github.com/users/shiftkey/orgs","repos_url":"https://api.github.com/users/shiftkey/repos","events_url":"https://api.github.com/users/shiftkey/events{/privacy}","received_events_url":"https://api.github.com/users/shiftkey/received_events","type":"User","site_admin":true},"labels":[{"id":875509647,"url":"https://api.github.com/repos/desktop/desktop/labels/infrastructure","name":"infrastructure","color":"e07362","default":false},{"id":590997902,"url":"https://api.github.com/repos/desktop/desktop/labels/ready-for-review","name":"ready-for-review","color":"0e8a16","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-30T18:35:12Z","updated_at":"2018-05-01T19:26:56Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/desktop/desktop/pulls/4562","html_url":"https://github.com/desktop/desktop/pull/4562","diff_url":"https://github.com/desktop/desktop/pull/4562.diff","patch_url":"https://github.com/desktop/desktop/pull/4562.patch"},"body":"Relates to #4548\r\n\r\nI wanted to remember what we were using `script/debug` for, but at first glance it appears the script no longer works:\r\n\r\n```\r\n~/src/desktop/ yarn debug\r\nyarn run v1.6.0\r\n$ cross-env NODE_ENV=development node script/debug\r\n/Users/shiftkey/src/desktop/script/debug:14\r\n    publicPath: config.output.publicPath,\r\n                              ^\r\n\r\nTypeError: Cannot read property 'publicPath' of undefined\r\n    at Object.<anonymous> (/Users/shiftkey/src/desktop/script/debug:14:31)\r\n    at Module._compile (module.js:662:30)\r\n    at Object.Module._extensions..js (module.js:673:10)\r\n    at Module.load (module.js:575:32)\r\n    at tryModuleLoad (module.js:515:12)\r\n    at Function.Module._load (module.js:507:3)\r\n    at Function.Module.runMain (module.js:703:10)\r\n    at startup (bootstrap_node.js:193:16)\r\n    at bootstrap_node.js:660:3\r\nerror Command failed with exit code 1.\r\ninfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.\r\n```\r\n\r\nThis seems to be the necessary fix to get the script working, based on what `script/start` does:\r\n\r\n```diff\r\ndiff --git a/script/debug b/script/debug\r\nindex ad4855567..4085107af 100644\r\n--- a/script/debug\r\n+++ b/script/debug\r\n@@ -4,14 +4,16 @@\r\n \r\n const express = require('express')\r\n const webpack = require('webpack')\r\n-const config = require('../app/webpack.development')\r\n+const configs = require('../app/webpack.development')\r\n const server = express()\r\n-const compiler = webpack(config)\r\n+const compiler = webpack(configs)\r\n const port = process.env.PORT || 3000\r\n \r\n+const [mainConfig, rendererConfig, askPassConfig] = configs\r\n+\r\n server.use(\r\n   require('webpack-dev-middleware')(compiler, {\r\n-    publicPath: config.output.publicPath,\r\n+    publicPath: rendererConfig.output.publicPath,\r\n     noInfo: true,\r\n   })\r\n )\r\n```\r\n\r\nThis script was added initially so that you could debug the app from VSCode, which we added in #914 but then removed in #2457 because it didn't seem to work right, so I think this should be cleaned up until we can revisit it and get it right.\r\n\r\ncc @iAmWillShepherd as you were involved with adding this\r\n"},"comment":{"url":"https://api.github.com/repos/desktop/desktop/issues/comments/385764660","html_url":"https://github.com/desktop/desktop/pull/4562#issuecomment-385764660","issue_url":"https://api.github.com/repos/desktop/desktop/issues/4562","id":385764660,"user":{"login":"iAmWillShepherd","id":1715082,"avatar_url":"https://avatars0.githubusercontent.com/u/1715082?v=4","gravatar_id":"","url":"https://api.github.com/users/iAmWillShepherd","html_url":"https://github.com/iAmWillShepherd","followers_url":"https://api.github.com/users/iAmWillShepherd/followers","following_url":"https://api.github.com/users/iAmWillShepherd/following{/other_user}","gists_url":"https://api.github.com/users/iAmWillShepherd/gists{/gist_id}","starred_url":"https://api.github.com/users/iAmWillShepherd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iAmWillShepherd/subscriptions","organizations_url":"https://api.github.com/users/iAmWillShepherd/orgs","repos_url":"https://api.github.com/users/iAmWillShepherd/repos","events_url":"https://api.github.com/users/iAmWillShepherd/events{/privacy}","received_events_url":"https://api.github.com/users/iAmWillShepherd/received_events","type":"User","site_admin":true},"created_at":"2018-05-01T19:26:56Z","updated_at":"2018-05-01T19:26:56Z","author_association":"CONTRIBUTOR","body":"Going to go ahead with a merge since this isn't user facing and removes what is essentially dead scripts."}}
{"actor":{"display_login":"iAmWillShepherd"}}