0

Is it possible to exclude lines of code when executing the debugger with F5? In Visual Studio there's the next statement (CTRL+SHIFT+F10). For example, I have lines of code that perform a log in and I don't want that log in to occur each time I start the debugger.

Thanks for your advice.

ford04
  • 66,267
  • 20
  • 199
  • 171
colonel_claypoo
  • 543
  • 1
  • 12
  • 25
  • Can you provide the code? – Modro Aug 26 '19 at 07:55
  • 1
    I don't think their are another way than commenting out the code `#` or `<# >`. https://stackoverflow.com/questions/7342597/how-do-you-comment-out-code-in-powershell/7344038#7344038 – Modro Aug 26 '19 at 07:58
  • @Modro, I thought that would be necessary as the question is very generic. Like: Can I start the debugger whilst excluding lines 1-14 plus 33 plus 50-75. I guess I'll have to stick to block comments then but I'll wait for other replies as well. Thanks. – colonel_claypoo Aug 26 '19 at 08:03
  • 1
    i know that this is possible with Powershell Studio. – Modro Aug 26 '19 at 08:58
  • Don't know of this being supported atm, but VS Code supports step out/in so for your dev testing, you could just add a boolean Switch parameter that either does or doesn't trigger the code you want to avoid executing – trebleCode Aug 27 '19 at 14:04

0 Answers0