none
Error: Attaching the PowerShell Debug Engine debugger to process failed

    Question

  • Hi,

    I have VS2017 Enterprise edition, fresh install with ".NET desktop development" selected + PowerShell Tools for VS2017 installed (as PowerShell is the only dev I do).

    Every time I try to run a PowerShell script (or simple cmdlet), I have the error "Attaching the PowerShell Debug Engine debugger to process '{[<GUID>']} on machine <machineName> failed."

    I have attached a screenshot for details.
    I'm on this issue for weeks!!! Still cannot find anything to solve my problem....

    VS2017_Error

    I have uninstalled / reinstalled VS2017 a hundred times, check permissions, tried attaching processes following MSFT article (https://msdn.microsoft.com/en-us/library/3s68z0b3.aspx), yet no luck :-(

    If I run cmdlets in the PowerShell Interactive window, it works perfectly, but not from the script pane.

    I have a Win10 machine, but not sure this is will help.

    Thanks for your help!


    Veronique - Please click Mark as Answer if that solved your issue or Vote As Helpful if the post has been helpful for you. Thanks!

    Saturday, January 20, 2018 4:28 PM

All replies

  • Are you using this PowerShell tools for Visual Studio 2017?

    I created a PowerShell project in VS2017, and the script run fine in my machine(Win 10), I also installed the extension above and opened it with PowerShell ISE, but still could not reproduce the issue, let me know if I missed something.

    I'm using VS2017 15.5.4. You could also try to update the PowerShell tools, which seems just released the newest version.

     

    Regards,

    Fletcher


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, January 22, 2018 9:12 AM
  • Updated PowerShell Tools for VS2017 this morning, but still the same error.

    Simple command + F5 (or CTRL+F5), but no luck....

    I used VS2017 Preview in the past, and was working fine, so I may be missing a config somewhere, even though I have the default (uninstalled/reinstalled VS2017 several times)



    Veronique - Please click Mark as Answer if that solved your issue or Vote As Helpful if the post has been helpful for you. Thanks!

    Monday, January 22, 2018 9:40 AM
  • If repair, uninstall/install did not resolve the issue, maybe you could try to remove Visual Studio completely and install it again:

    https://docs.microsoft.com/en-us/visualstudio/install/remove-visual-studio

    Sorry about this brought you such inconvenience.

     

    Regards,

    Fletcher


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, January 23, 2018 6:54 AM
  • I have the same issue, I have tried all the above steps without a resolution

    Anything else to try?

    Windows 10, but running on a VMWare VM

    Tuesday, January 30, 2018 3:55 PM
  • Hiya,

    I never got it resolved, so I switched to Visual Studio Code and I'm happy with that.



    Veronique - Please click Mark as Answer if that solved your issue or Vote As Helpful if the post has been helpful for you. Thanks!

    Friday, February 02, 2018 9:03 AM
  • FYI - I reinstalled VS2015 that I used before (+ PowerShell Tools) out of curiosity, and PowerShell works as expected without doing anything different than with VS2017....


    Veronique - Please click Mark as Answer if that solved your issue or Vote As Helpful if the post has been helpful for you. Thanks!


    • Edited by VeronicaGeek Saturday, February 03, 2018 10:11 PM Added comments
    Saturday, February 03, 2018 10:07 PM
  • FYI - I reinstalled VS2015 that I used before (+ PowerShell Tools) out of curiosity, and PowerShell works as expected without doing anything different than with VS2017....


    Veronique - Please click Mark as Answer if that solved your issue or Vote As Helpful if the post has been helpful for you. Thanks!



    Does it mean the issue is gone in VS2017 or the issue happens to VS2015 now? 

    If the issue still persists you could also open an issue on GitHub as well, where might have some experts on PowerShell could help:

    https://github.com/adamdriscoll/poshtools/issues

    Thanks for your kind understanding.

      

    Regards,

    Fletcher


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, February 05, 2018 8:39 AM
  • I have the same issue here on newly installed VS2017... I'm new to visual studio. Never used it before, but so far it doesn't seem to work properly. I have installed it on a Hyper-V vm. Installed PSTools as well.

    But everytime I run a ps script, I get this same error.

    Should someone know anything about this... any help is appreciated.

    Regards,

    Tom

    Tuesday, March 06, 2018 1:27 PM
  • Did you or anyone ever manage to solve this? I'm having this exact same issue on multiple computers. All running Windows 10 Pro (one even a clean install), Visual Studio 2017 Community Edition with the .NET Desktop Development components and the Powershell Tools.

    Exact same error message everywhere with no other significant search results but this thread.

    Tuesday, May 29, 2018 2:04 PM