How do I configure Visual Studio 2022 (not VS Code) to be able to debug my Local Wordpress Site?

What issue or error are you experiencing?

How do I configure Visual Studio 2022 to debug my Local WordPress site? The editor is recognizing php as a valid file type, but when I click debug, I get an error saying “Please select a valid startup item”.

I’m new to WordPress development and would really like to use Visual Studio to debug.

What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc

Open Visual Studio and then open the folder where Wordpress lives (Users/[username]/Local Sites/[site folder]), then click Debug (or even run).

System Details

  • Local Version:

  • Operating System (OS) and OS version:
    Windows Server 2012 (also Windows-11)

Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)
Not getting that far…

Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.