Browser preview - Unable to find it
Hello everyone. As in subject, I can't find the relevant option to preview HTML/PHP file in Browser while debugging it. Please, can someone help me?
Thanks in advance for any kind of support. Regards, have a nice day.
Kindly, Giuseppe.
Nevermind, I found it. I feel very dumb, it was really easy to find.
Now I only miss a way to open the internal browser.
Ok, also found how to use internal browser. Unfortunately, the preview doesn't load. If I run the debug from the right-up corner, I get a random port and it never loads, if I use the debugger side panel, the debugger stops and tells me the address is already in use, regardless the IP and port I enter in the launch.json file.
Please, any help?
Thanks in advance for any support. Regards, have a nice day.
Kindly, Giuseppe.
P.S.: I'm using GitHub CodeSpaces.
Hi! The top right debugger icon will start the debugger on a random port and then execute the currently open PHP file as a terminal script. In a normal scenario you would have a web-server running on your system (or container) and you wild start the debugger in the side panel whenever you'd like to debug a request. You would open the page you are working on with a normal browser.
Remember, it's the PHP process that connects to the debugger (running inside VSCode) and your browser that connects to PHP.
Can you share how you have things setup in CodeSpaces? Do you have a web server running? Or are you using something like Laravel Sail? I never used the internal browser yet, so I'd love to get a better understanding.