{"action":"created","issue":{"url":"https://api.github.com/repos/KirkMunro/DebugPx/issues/1","labels_url":"https://api.github.com/repos/KirkMunro/DebugPx/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/KirkMunro/DebugPx/issues/1/comments","events_url":"https://api.github.com/repos/KirkMunro/DebugPx/issues/1/events","html_url":"https://github.com/KirkMunro/DebugPx/issues/1","id":57529365,"number":1,"title":"Prevent breakpoint lines from being included production code","user":{"login":"ghostsquad","id":903488,"avatar_url":"https://avatars.githubusercontent.com/u/903488?v=3","gravatar_id":"","url":"https://api.github.com/users/ghostsquad","html_url":"https://github.com/ghostsquad","followers_url":"https://api.github.com/users/ghostsquad/followers","following_url":"https://api.github.com/users/ghostsquad/following{/other_user}","gists_url":"https://api.github.com/users/ghostsquad/gists{/gist_id}","starred_url":"https://api.github.com/users/ghostsquad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghostsquad/subscriptions","organizations_url":"https://api.github.com/users/ghostsquad/orgs","repos_url":"https://api.github.com/users/ghostsquad/repos","events_url":"https://api.github.com/users/ghostsquad/events{/privacy}","received_events_url":"https://api.github.com/users/ghostsquad/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-12T22:25:45Z","updated_at":"2015-02-12T23:13:28Z","closed_at":null,"body":"This looks really interesting, though I'm curious how you would prevent breakpoint lines from being checked into production code? It seems I'd have to be extra diligent, or run some sort of linting tool to check if I have any \"breakpoint\" or \"ifdebug\" lines in my scripts before committing."},"comment":{"url":"https://api.github.com/repos/KirkMunro/DebugPx/issues/comments/74174242","html_url":"https://github.com/KirkMunro/DebugPx/issues/1#issuecomment-74174242","issue_url":"https://api.github.com/repos/KirkMunro/DebugPx/issues/1","id":74174242,"user":{"login":"KirkMunro","id":3515485,"avatar_url":"https://avatars.githubusercontent.com/u/3515485?v=3","gravatar_id":"","url":"https://api.github.com/users/KirkMunro","html_url":"https://github.com/KirkMunro","followers_url":"https://api.github.com/users/KirkMunro/followers","following_url":"https://api.github.com/users/KirkMunro/following{/other_user}","gists_url":"https://api.github.com/users/KirkMunro/gists{/gist_id}","starred_url":"https://api.github.com/users/KirkMunro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KirkMunro/subscriptions","organizations_url":"https://api.github.com/users/KirkMunro/orgs","repos_url":"https://api.github.com/users/KirkMunro/repos","events_url":"https://api.github.com/users/KirkMunro/events{/privacy}","received_events_url":"https://api.github.com/users/KirkMunro/received_events","type":"User","site_admin":false},"created_at":"2015-02-12T23:13:28Z","updated_at":"2015-02-12T23:13:28Z","body":"You're right, since these are not native commands, that means your code would have a dependency on the DebugPx module.  I wish they were just natively included in PowerShell, but even if they add them at this point, they would only be in v.Next which is many, many years away from becoming my baseline version (which is currently v3, but I only recently switched to that as my baseline).\r\n\r\nI'm not sure this is a huge issue for ifdebug commands because that is logic I wouldn't want removed from release builds.  Otherwise, why go through the trouble of adding ifdebug, if it's only output that you'll use during dev/test work?  The intent is to enable richer debug output (including gathering extra details that may take more time) from PowerShell but only when running with -Debug or $DebugPreference set to Continue.\r\n\r\nSomething that might help with this that I have considered: having a cmdlet in DebugPx that automatically removes ifdebug and breakpoint commands in a script or module that you specify.  A command like that could be included in any release procedures to remove those statements prior to release.  For my own module dev/test/release cycle that would work fine, because I do all dev work on one git branch (master) and all release builds that are signed go into another branch (release).  For the dev/master branch, I wouldn't worry about having breakpoint/ifdebug in there (in fact, I may explicitly want them in there), but as part of my release automation I could clean those commands out of my scripts/modules if desired.  Let me know what you think of that idea.\r\n\r\nHow do you handle releasing your PowerShell scripts/modules?  Is it considered production the moment it is checked into source control?  Or do you have a release procedure that signs your script files where the removal of breakpoint/ifdebug commands could happen?  Understanding how others go through dev/test/release with PowerShell may also help me come up with something that works."}}