Log messages to VS output window?
6 posts
• Page 1 of 1
Log messages to VS output window?
Hi all
As a long time .NET developer I'm used to log messages to the output window of Visual Studio.
Is it somehow possible to log messages to the output window from PHP? I tried error_log but without success.
Is there any possibility to achieve this?
Thanks for any answer in advance.
Stefan
As a long time .NET developer I'm used to log messages to the output window of Visual Studio.
Is it somehow possible to log messages to the output window from PHP? I tried error_log but without success.
Is there any possibility to achieve this?
Thanks for any answer in advance.
Stefan
- bornste
- Posts: 15
- Joined: September 10th, 2012, 5:47 am
- Location: Switzerland
Re: Log messages to VS output window?
Hi Stefan,
that seems to be relatively easy to implement. We'll include this in the next update.
Thank you
that seems to be relatively easy to implement. We'll include this in the next update.
Thank you
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
Re: Log messages to VS output window?
Hi Miloslav,
any news on this?
I have the latest beta installed (1.5.3776) but it doesn't seem to work. If you have this feature already implemented how am I able to log to the output window? Does it work when debugging with a custom webserver?
Thanks for a short answer!
Stefan
any news on this?
I have the latest beta installed (1.5.3776) but it doesn't seem to work. If you have this feature already implemented how am I able to log to the output window? Does it work when debugging with a custom webserver?
Thanks for a short answer!
Stefan
- bornste
- Posts: 15
- Joined: September 10th, 2012, 5:47 am
- Location: Switzerland
Re: Log messages to VS output window?
Hi Stefan,
Unfortunatelly it's not in the current release. This would be easy to implement on our end(basicaly support is already there), unfortunatelly it turned out that XDebug doesn't support it even that DBGp protocol does.
XDebug just supports to forward complete output, which is kind of useless I think.
I'll speak with the creator of XDebug to see if he could include support for this in some of the next releases.
Other alternative would be just to ready error_log file and post it to Output window. Which isn't quite nice, I'd prefer more elegant way to do it. And it wouldn't work for custom server as we are not able to locate this file automaticaly.
Unfortunatelly it's not in the current release. This would be easy to implement on our end(basicaly support is already there), unfortunatelly it turned out that XDebug doesn't support it even that DBGp protocol does.
XDebug just supports to forward complete output, which is kind of useless I think.
I'll speak with the creator of XDebug to see if he could include support for this in some of the next releases.
Other alternative would be just to ready error_log file and post it to Output window. Which isn't quite nice, I'd prefer more elegant way to do it. And it wouldn't work for custom server as we are not able to locate this file automaticaly.
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
Re: Log messages to VS output window?
Of course it would be cool to have this built in, but I was able to make a dumb socket client/server pretty quickly in PHP.
For the server you can just output everything you receive, then you can make a client function called console_log or something in your project's code. Configure it in Visual Studio => Tools => External Tools and check the "Use output window" box. Consider var_export($stuff, true) also. Works like a champ.
http://php.net/manual/en/book.sockets.php
For the server you can just output everything you receive, then you can make a client function called console_log or something in your project's code. Configure it in Visual Studio => Tools => External Tools and check the "Use output window" box. Consider var_export($stuff, true) also. Works like a champ.
http://php.net/manual/en/book.sockets.php
- hans
- Posts: 12
- Joined: December 12th, 2012, 11:32 pm
Re: Log messages to VS output window?
Hi Hans,
Nice! That's a nice way how to achive this until there is something built-in. If you wouldn't mind sharing your tool (e.g. here or on github) I think other users would appreciate it.
Thank you
Nice! That's a nice way how to achive this until there is something built-in. If you wouldn't mind sharing your tool (e.g. here or on github) I think other users would appreciate it.
Thank you
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 42 guests