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.
hk1
 
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

Hello!

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}".

tracepoint.png


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

Hope that will help!

Cheers,
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: 1021
Joined: January 7th, 2012, 8:36 pm


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 1 guest

cron

User Control Panel

Login

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 62 on January 7th, 2012, 10:54 pm

Users browsing this forum: No registered users and 1 guest
Phalanger