Possible to Write to VS Output Window?

PHP Tools [?] extends Visual Studio with set of advanced features to work more efficiently with PHP code.

Possible to Write to VS Output Window?

Postby hk1 » July 10th, 2017, 5:24 pm

Is it possible to write to the Visual Studio Output Window? I'm using PHP Tools with Visual Studio 2015 and am also using X-Debug and I'd like to be able to put some kind of print statement in my PHP that writes out to the Output > Debug window.
Posts: 2
Joined: June 16th, 2017, 2:36 pm

Re: Possible to Write to VS Output Window?

Postby Miloslav Beno » July 11th, 2017, 2:47 pm


You might want to use "Tracepoints". Just create a breakpoint then to hover the breakpoint sign and select settings symbol. It will open a breakpoint settings dialog where you canfill the log message in to the Actions section.

The log message can cointan text and curly braces where you can include php expression which is going to be evaluated once the location is reached. e.g. "The value of $x is {$x}".


This way you don't need to modify your code and you will get what you want.

Hope that will help!

You do not have the required permissions to view the files attached to this post.
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
Posts: 1252
Joined: January 7th, 2012, 8:36 pm


Postby uwe » December 5th, 2018, 8:14 am

I'm also looking for a way to directly write to the VS Output Windows.

I absolutely want to do it by code.

Is there really no way to do it by code?
Posts: 21
Joined: October 10th, 2016, 8:39 am

Re: Possible to Write to VS Output Window?

Postby jazz » December 18th, 2018, 1:38 am

Any output from PHP will be sent to the browser. For this to work in PHP Tools, XDebug would have to support it and XDebug does not do anything like that.

If you want to log output from your application, write to a file or take a look at something like Firebug or Chrome Logger.
Try Hazaar MVC - http://www.hazaarmvc.com
The MVC Framework that makes PHP not suck!

User avatar
Posts: 41
Joined: August 25th, 2016, 1:59 am
Location: Canberra, Australia

Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 10 guests

User Control Panel


Who is online

In total there are 10 users online :: 0 registered, 0 hidden and 10 guests (based on users active over the past 5 minutes)
Most users ever online was 787 on May 12th, 2024, 11:50 am

Users browsing this forum: No registered users and 10 guests